diff mbox series

[FFmpeg-devel,7/7] avcodec/h261dec: Discard whole packet when discarding

Message ID AS8P250MB0744E863CBDED1DA12E264518FC8A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit b561dafd561cd8bff1f0ba89e49badf16654d0f2
Headers show
Series [FFmpeg-devel,1/7] avcodec/wmv2dec: Parse extradata during init | expand

Commit Message

Andreas Rheinhardt Oct. 7, 2023, 12:40 a.m. UTC
(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>
---
 libavcodec/h261dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 272bbbea34..8a823793e5 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -631,7 +631,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;