mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/movenc: handle OOM situations when parsing AC-3 headers
Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
This commit is contained in:
parent
3854c58d9e
commit
c9de096851
@ -416,7 +416,10 @@ static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track)
|
||||
if (!info->pkt && !(info->pkt = av_packet_alloc()))
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if (avpriv_ac3_parse_header(&hdr, pkt->data, pkt->size) < 0) {
|
||||
if ((ret = avpriv_ac3_parse_header(&hdr, pkt->data, pkt->size) < 0)) {
|
||||
if (ret == AVERROR(ENOMEM))
|
||||
goto end;
|
||||
|
||||
/* drop the packets until we see a good one */
|
||||
if (!track->entry) {
|
||||
av_log(mov->fc, AV_LOG_WARNING, "Dropping invalid packet from start of the stream\n");
|
||||
|
Loading…
Reference in New Issue
Block a user