Re: [FFmpeg-devel] [PATCH v4] avformat/nutdec: Add check for avformat_new_stream

2022-02-23 Thread Michael Niedermayer
On Wed, Feb 23, 2022 at 10:31:59AM +0800, Jiasheng Jiang wrote: > As the potential failure of the memory allocation, > the avformat_new_stream() could return NULL pointer. > Therefore, it should be better to check it and return > error if fails. > Also, the caller, nut_read_header(), needs to deal

[FFmpeg-devel] [PATCH v4] avformat/nutdec: Add check for avformat_new_stream

2022-02-22 Thread Jiasheng Jiang
As the potential failure of the memory allocation, the avformat_new_stream() could return NULL pointer. Therefore, it should be better to check it and return error if fails. Also, the caller, nut_read_header(), needs to deal with the return value of the decode_main_header() and return error if memo