Inspired by qoidec

/Tomas
From ed49d383d40a9a4fad04b76bc7d86107c6350d9a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <g...@haerdin.se>
Date: Wed, 8 May 2024 14:17:57 +0200
Subject: [PATCH 2/3] lavc/speedhqdec: Obey AVDISCARD_ALL

---
 libavcodec/speedhqdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/speedhqdec.c b/libavcodec/speedhqdec.c
index e54e25cb25..d6b1fff7a5 100644
--- a/libavcodec/speedhqdec.c
+++ b/libavcodec/speedhqdec.c
@@ -424,6 +424,9 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame,
         return AVERROR_INVALIDDATA;
     }
 
+    if (avctx->skip_frame >= AVDISCARD_ALL)
+        return avpkt->size;
+
     compute_quant_matrix(s->quant_matrix, 100 - quality);
 
     second_field_offset = AV_RL24(buf + 1);
-- 
2.39.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to