[FFmpeg-devel] [PATCH] HTTP cookie support

Micah Galizia micahgalizia at gmail.com
Sun Jan 13 20:09:21 CET 2013

On Sun, Jan 13, 2013 at 8:43 AM, Stefano Sabatini <stefasab at gmail.com>wrote:


> > +                char *tmp = s->cookies;
> > +                size_t str_size = strlen(tmp) + strlen(p) + 2;
> > +                if (!(s->cookies = av_malloc(str_size))) {
> > +                    s->cookies = tmp;
> > +                    return AVERROR(ENOMEM);
> > +                }
> > +                snprintf(s->cookies, str_size, "%s\n%s", tmp, p);
> > +                av_free(tmp);
> Alternatively this may realloc cookies (would require to store
> cookies_size in the context), or even use a list of pair-values
> couples, so you don't need to parse them later (but feel free to keep
> the current implementation).

I am going to keep the existing implementation, but thank you for the


> Alternatively we may want to support a syntax of the kind:
> ffplay -proto http=cookies="....":... URI
> to force protocol and options.

I haven't seen that before, but I think I'll keep consistent with all of
the other http options and stay with what is done (I'm assuming that's an
optional recommendation as well).

Attached are the same patches with the recommendations implemented.

"The mark of an immature man is that he wants to die nobly for a cause,
while the mark of the mature man is that he wants to live humbly for
one."   --W. Stekel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-add-HTTP-protocol-cookie-support.patch
Type: application/octet-stream
Size: 6778 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130113/e282ae45/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-document-HTTP-protocol-cookie-support.patch
Type: application/octet-stream
Size: 1451 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130113/e282ae45/attachment-0001.obj>

More information about the ffmpeg-devel mailing list