diff options
Diffstat (limited to 'libavcodec/lscrdec.c')
-rw-r--r-- | libavcodec/lscrdec.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/lscrdec.c b/libavcodec/lscrdec.c index 76a46751f0..415914bf0a 100644 --- a/libavcodec/lscrdec.c +++ b/libavcodec/lscrdec.c @@ -154,10 +154,13 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, size = bytestream2_get_le32(gb); - frame->key_frame = (nb_blocks == 1) && - (w == avctx->width) && - (h == avctx->height) && - (x == 0) && (y == 0); + if ((nb_blocks == 1) && + (w == avctx->width) && + (h == avctx->height) && + (x == 0) && (y == 0)) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; bytestream2_seek(gb, 2 + nb_blocks * 12 + offset, SEEK_SET); csize = bytestream2_get_be32(gb); @@ -199,7 +202,7 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(rframe, frame)) < 0) return ret; |