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

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang 2021-11-26 19:49:01 +08:00
parent b51d772a50
commit 17b434f1ce
1 changed files with 3 additions and 3 deletions

View File

@ -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;