[FFmpeg-devel] [PATCH] Maintain HTTP options across multiple requests in HLS demuxer

Clément Bœsch ubitux at gmail.com
Sun Dec 23 14:50:51 CET 2012


On Thu, Dec 20, 2012 at 10:17:16PM -0500, Micah Galizia wrote:
> Hello,
> 
> I emailed yesterday about the HLS demuxer not setting HTTP options, such as
> "user-agent" or "headers", after the first playlist request. Nobody
> responded, so here is a patch.
> 
> I think the most intrusive aspect of this change is the addition of an
> AVDictionary pointer to the AVFormatContext to store the initial options.
> The rest of the changes are confined to hls.c.
> 
> I've run this against `make fate` and there were no errors and all that
> came from patcheck were innocuous messages.
> 
> Thanks in advance for the review.
> 

Sorry for the long delay…

> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index c907d4e..f0d6b95 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -1087,6 +1087,11 @@ typedef struct AVFormatContext {
>      AVDictionary *metadata;
>  
>      /**
> +     * Copy of initial options.
> +     */
> +    AVDictionary *options;
> +
> +    /**

You can't insert this here; it's breaking ABI. It would be allowed at the
end, but I wonder if you can't do this differently…

Why don't you just add a AVDictionary to the local HLSContext, and use it
all the time instead?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121223/c36ce8e3/attachment.asc>


More information about the ffmpeg-devel mailing list