[FFmpeg-devel] [PATCH 1/2] lavf/http: Parse and/or expose various client data.
klaxa1337 at googlemail.com
Thu Aug 20 19:28:27 CEST 2015
On Thu, Aug 20, 2015 at 6:51 PM, Nicolas George <george at nsup.org> wrote:
> Le tridi 3 fructidor, an CCXXIII, Stephan Holljes a écrit :
>> In ffserver the User-Agent is used to decide how to deal with a
>> client. (WMP being a special case.)
> Ok, but that is special case for a specific application.
>> That sounds pretty optimistic. Maybe it is trivial for you, but from
>> my standpoint it looks like a rather large-ish undertaking to rewrite
>> all the header-parsing code to utilize an AVDictionary.
> You do not need to change the code to use the dictionary. That would be a
> lot of work, but I do not think it would be very interesting. All you need
> to do is to is to put all the headers in a dictionary, before the parsing
> (or after, but if you do it before, the parsing can alter the buffer, that
> is more convenient).
> In http.c, near "!av_strcasecmp(tag, "Location")", you have the header name
> in "tag" and its value in "p", just do a av_dict_add() on them with a bit of
> tracking for the total number.
You are right, it was quite simple if I just keep a copy. I will send
a patch shortly.
> Nicolas George
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel