X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=blobdiff_plain;f=libavcodec%2Ftscc2.c;h=a8c7ee7996159377eb2083c47604b88cd7f94a44;hp=f64c76507ec48614400817f15e131cd28d221c54;hb=4dc3714c48e74e75a3a9c7d9fb52fd5917107508;hpb=ea71a48c7e8a76ee447fa518cca087df9288288d diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c index f64c76507e..a8c7ee7996 100644 --- a/libavcodec/tscc2.c +++ b/libavcodec/tscc2.c @@ -235,18 +235,15 @@ static int tscc2_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_INVALIDDATA; } - if ((ret = ff_reget_buffer(avctx, c->pic)) < 0) { - return ret; - } - if (frame_type == 0) { - *got_frame = 1; - if ((ret = av_frame_ref(data, c->pic)) < 0) - return ret; - + // Skip duplicate frames return buf_size; } + if ((ret = ff_reget_buffer(avctx, c->pic)) < 0) { + return ret; + } + if (bytestream2_get_bytes_left(&gb) < 4) { av_log(avctx, AV_LOG_ERROR, "Frame is too short\n"); return AVERROR_INVALIDDATA;