[FFmpeg-devel] [PATCH V1] lavc/mpeg4audio: add chan_config check to avoid indeterminate channels
Moritz Barsnick
barsnick at gmx.net
Sat Sep 21 16:07:04 EEST 2019
On Sat, Sep 21, 2019 at 19:29:47 +0800, Jun Zhao wrote:
> + else {
> + av_log(NULL, AV_LOG_ERROR, "Invalid chan_config %d\n", c->chan_config);
> + return -1;
> + }
I know the function definition says it returns -1 on error, but that's
already not the case: It can return AVERROR_INVALIDDATA by means of the
call to parse_config_ALS(). I believe the doc should be changed, and
this code change should also return AVERROR_INVALIDDATA.
Furthermore, can you pass and find a useful context for this av_log()
(and for the one in parse_config_ALS()? av_log() with NULL context is
very unfortunate.
Cheers,
Moritz
More information about the ffmpeg-devel
mailing list