mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-02 17:12:49 +02:00
dxa: fix support of decoding all frames even in the absence of references
The case where decoding should only happen for keyframes and afterwards (CODEC_FLAG2_SHOW_ALL not set) does not fully work neither before nor after this Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
186e47ef6d
commit
9640ea1da4
@ -264,7 +264,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
|
|||||||
case 5:
|
case 5:
|
||||||
if (!tmpptr && (compr & 1)) {
|
if (!tmpptr && (compr & 1)) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
|
av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
|
||||||
return AVERROR_INVALIDDATA;
|
if (!(avctx->flags2 & CODEC_FLAG2_SHOW_ALL))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
frame->key_frame = !(compr & 1);
|
frame->key_frame = !(compr & 1);
|
||||||
frame->pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
|
frame->pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
|
||||||
|
Loading…
Reference in New Issue
Block a user