[FFmpeg-cvslog] avcodec/bitpacked_dec: setting pict_type and key_frame after decode()

Limin Wang git at videolan.org
Thu Dec 9 03:11:25 EET 2021


ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Fri Nov 26 19:49:01 2021 +0800| [17b434f1ce0bb1687460ee5539fa8038bbc9018c] | committer: Limin Wang

avcodec/bitpacked_dec: setting pict_type and key_frame after decode()

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17b434f1ce0bb1687460ee5539fa8038bbc9018c
---

 libavcodec/bitpacked_dec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/bitpacked_dec.c b/libavcodec/bitpacked_dec.c
index c1cb6acefe..a2edccc43c 100644
--- a/libavcodec/bitpacked_dec.c
+++ b/libavcodec/bitpacked_dec.c
@@ -129,13 +129,13 @@ static int bitpacked_decode(AVCodecContext *avctx, void *data, int *got_frame,
     AVFrame *frame = data;
     int res;
 
-    frame->pict_type = AV_PICTURE_TYPE_I;
-    frame->key_frame = 1;
-
     res = bc->decode(avctx, frame, avpkt);
     if (res)
         return res;
 
+    frame->pict_type = AV_PICTURE_TYPE_I;
+    frame->key_frame = 1;
+
     *got_frame = 1;
     return buf_size;
 



More information about the ffmpeg-cvslog mailing list