On Thu, Sep 22, 2016 at 04:29:11PM +0200, Anton Khirnov wrote:
> --- a/libavformat/internal.h
> +++ b/libavformat/internal.h
> @@ -113,6 +113,15 @@ struct AVStreamInternal {
>  
> +    /* the context for extracting extradata in find_stream_info()
> +     * inited=1/bsf=NULL signals that extracting is not possible (codec not
> +     * supported) */
> +    struct {
> +        AVBSFContext *bsf;
> +        AVPacket     *pkt;
> +        int inited;

"initialized"? "inited" is Engrish.

> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -2089,6 +2089,104 @@ static int get_std_framerate(int i)
>  
> +static int extract_extradata_init(AVStream *st)
> +{
> +    /* if init fails here, we assume extracting extradata is just not
> +     * supported for this codec, so we return success */
> +    ret = av_bsf_init(i->extract_extradata.bsf);
> +    if (ret < 0) {
> +        av_bsf_free(&i->extract_extradata.bsf);
> +        ret = 0;
> +    }
> +
> +finish:
> +    i->extract_extradata.inited = 1;
> +
> +    return 0;

Setting ret to 0 is pointless.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to