avformat/latmenc: abort if no extradata is available

Fixes ticket #8273.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit dd01947397)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
James Almer 2019-10-15 11:38:23 -03:00 committed by Michael Niedermayer
parent c55cf1d0cc
commit c4629d8abe
1 changed files with 2 additions and 1 deletions

View File

@ -176,7 +176,8 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
if (ret < 0)
return ret;
memcpy(par->extradata, side_data, side_data_size);
}
} else
return AVERROR_INVALIDDATA;
}
}