On 27/09/16 16:35, Anton Khirnov wrote: > Quoting Diego Biurrun (2016-09-22 17:58:13) >> 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. > > Other variable names are not english either. > >> >>> --- 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. > > In the current code, yes, but it prevents future surprises in case more > stuff is added there. >
return ret; Should make both happy I guess. lu _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel