On 06/09/2011 06:27 AM, Anton Khirnov wrote:

> Add support for demuxer private options.

> +int avformat_open_input(AVFormatContext **ps, const char *filename, 
> AVDictionary **options)
> +{
> +    AVFormatContext *s = *ps;
[...]
> +fail:
> +    av_dict_free(&tmp);
> +    if (s->pb && !(s->flags & AVFMT_FLAG_CUSTOM_IO))
> +        avio_close(s->pb);
> +    avformat_free_context(s);
> +    *ps = NULL;


Do we really want to free and zero a user-supplied AVFormatContext on
failure?  If so, we should probably say so in the documentation.  If not
we need to check whether or not the user supplied a pre-allocated context.

rest of the patch looks ok.

-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to