avformat/mxfdec: do not ignore bad size errors

The return value was unintentionally lost after
00a2652df3bf25a27d174cc67ed508b5317cb115.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 6ee40dcb64c91cc9a4cb988408d8ed159dacdcfe)
This commit is contained in:
Marton Balint 2019-08-17 11:40:11 +02:00
parent 299e0dff1f
commit 370c346d5d

View File

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