[FFmpeg-devel] [PATCH 2/2] avformat: add protocol_whitelist

James Almer jamrial at gmail.com
Sun Jan 24 04:15:38 CET 2016


On 1/23/2016 11:42 PM, Michael Niedermayer wrote:
> diff --git a/libavformat/avio.h b/libavformat/avio.h
> index c3c0b73..26c39b2 100644
> --- a/libavformat/avio.h
> +++ b/libavformat/avio.h
> @@ -595,6 +595,10 @@ int avio_open(AVIOContext **s, const char *url, int flags);
>  int avio_open2(AVIOContext **s, const char *url, int flags,
>                 const AVIOInterruptCB *int_cb, AVDictionary **options);
>  
> +int avio_open_whitelist(AVIOContext **s, const char *url, int flags,

Maybe this could be called avio_open3() instead, superseding avio_open2()
which would in turn become deprecated.

Seeing how avio_open2() with this patch becomes just a wrapper for the new
function with an empty whitelist argument, it can easily be introduced as
a replacement. It would encourage people to update their code and consider
putting this feature to use.

> +                         const AVIOInterruptCB *int_cb, AVDictionary **options,
> +                         const char *whitelist);
> +
>  /**
>   * Close the resource accessed by the AVIOContext s and free it.
>   * This function can only be used if s was opened by avio_open().



More information about the ffmpeg-devel mailing list