From: Jan Ekström <[email protected]>
Signed-off-by: Jan Ekström <[email protected]>
---
libavformat/movenc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index a1daf3598b..0f92f0e04e 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -415,7 +415,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");
--
2.36.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".