mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/decode: also check for FF_CODEC_CAP_SETS_PKT_DTS in audio decoders
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
79aa2ff199
commit
b3570f0389
|
@ -413,9 +413,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
} else {
|
} else {
|
||||||
ret = avctx->codec->decode(avctx, frame, &got_frame, &tmp);
|
ret = avctx->codec->decode(avctx, frame, &got_frame, &tmp);
|
||||||
|
|
||||||
|
if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
|
||||||
|
frame->pkt_dts = pkt->dts;
|
||||||
if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
|
if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
|
||||||
if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
|
|
||||||
frame->pkt_dts = pkt->dts;
|
|
||||||
if(!avctx->has_b_frames)
|
if(!avctx->has_b_frames)
|
||||||
frame->pkt_pos = pkt->pos;
|
frame->pkt_pos = pkt->pos;
|
||||||
//FIXME these should be under if(!avctx->has_b_frames)
|
//FIXME these should be under if(!avctx->has_b_frames)
|
||||||
|
@ -426,8 +426,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
if (!frame->height) frame->height = avctx->height;
|
if (!frame->height) frame->height = avctx->height;
|
||||||
if (frame->format == AV_PIX_FMT_NONE) frame->format = avctx->pix_fmt;
|
if (frame->format == AV_PIX_FMT_NONE) frame->format = avctx->pix_fmt;
|
||||||
}
|
}
|
||||||
} else if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
|
|
||||||
frame->pkt_dts = pkt->dts;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emms_c();
|
emms_c();
|
||||||
|
|
Loading…
Reference in New Issue