aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-07 02:28:16 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-11 22:28:24 +0200
commitb561dafd561cd8bff1f0ba89e49badf16654d0f2 (patch)
tree9d810410e5c3c5cb5c8db855556495419163f7a0
parentc995311bcfdab5ed3e2bb5bfbbca3fac98bec70d (diff)
downloadffmpeg-b561dafd561cd8bff1f0ba89e49badf16654d0f2.tar.gz
avcodec/h261dec: Discard whole packet when discarding
(The return value doesn't really matter: For video decoders every return value >= 0 is treated as "consumed all of the input".) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/h261dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 2024bf6b19..e227c1785e 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -637,7 +637,7 @@ static int h261_decode_frame(AVCodecContext *avctx, AVFrame *pict,
if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) ||
(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I) ||
avctx->skip_frame >= AVDISCARD_ALL)
- return get_consumed_bytes(s, buf_size);
+ return buf_size;
if (ff_mpv_frame_start(s, avctx) < 0)
return -1;