avformat/mxfdec: do not ignore bad size errors
authorMarton Balint <cus@passwd.hu>
Sat, 17 Aug 2019 09:40:11 +0000 (11:40 +0200)
committerMarton Balint <cus@passwd.hu>
Thu, 22 Aug 2019 19:38:41 +0000 (21:38 +0200)
The return value was unintentionally lost after
00a2652df3bf25a27d174cc67ed508b5317cb115.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/mxfdec.c

index bb72fb9..397f820 100644 (file)
@@ -3508,8 +3508,8 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
                 } else {
                     if ((size = next_ofs - pos) <= 0) {
                         av_log(s, AV_LOG_ERROR, "bad size: %"PRId64"\n", size);
-                        ret = AVERROR_INVALIDDATA;
-                        goto skip;
+                        mxf->current_klv_data = (KLVPacket){{0}};
+                        return AVERROR_INVALIDDATA;
                     }
                     // We must not overread, because the next edit unit might be in another KLV
                     if (size > max_data_size)