diff mbox series

[FFmpeg-devel,3/5] avcodec/bitpacked_dec: setting pict_type and key_frame after decode()

Message ID 1638365954-29420-3-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit 17b434f1ce0bb1687460ee5539fa8038bbc9018c
Headers show
Series [FFmpeg-devel,1/5] avformat/rtsp: make use of avio_get_str() to load the sdp | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Limin Wang Dec. 1, 2021, 1:39 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavcodec/bitpacked_dec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/bitpacked_dec.c b/libavcodec/bitpacked_dec.c
index c1cb6ac..a2edccc 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;