On Tue, Feb 22, 2022 at 10:14 AM Jiasheng Jiang <jiash...@iscas.ac.cn> wrote:
> On Tue, Feb 22, 2022 at 04:10:51PM +0800, Paul B Mahol wrote: > > >> As the potential failure of the memory allocation, the > ff_get_extradata() > >> could return error if fails. > >> Therefore, it should be better to deal with the return value of the > >> ff_get_extradata() and return error if fails. > >> > > > > > > Not really necessary. Does not fix anything. > > It is true that the 'extradata' could be NULL and have not used. > But I have checked many other callers of the ff_get_extradata(), > such as avi_read_header() in `libavformat/avidec.c`. > They all have checked the return value to guarantee the 'extradata' > to be non-NULL. > That means in the future, if the 'aix->extradata' is used, the programmer > may not notice that 'aix->extradata' is especial and needs to be checked > before use. > Therefore, I think it is necessary to add the check to guarantee the > consisitency of the code. > Nope, that does not make sense, it should always be checked. > > Thanks, > Jiang > > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".