avformat/movenc: Check av_malloc()
Fixes Coverity issue #1596735. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
df868bae23
commit
601873263e
@ -1221,6 +1221,8 @@ static int mov_write_chnl_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra
|
||||
if (ret || !config) {
|
||||
config = 0;
|
||||
speaker_pos = av_malloc(layout->nb_channels);
|
||||
if (!speaker_pos)
|
||||
return AVERROR(ENOMEM);
|
||||
ret = ff_mov_get_channel_positions_from_layout(layout,
|
||||
speaker_pos, layout->nb_channels);
|
||||
if (ret) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user