aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/decode.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-05-01 20:01:22 -0300
committerJames Almer <jamrial@gmail.com>2017-05-02 20:47:33 -0300
commitb3570f03893cc6f29472f418a144252fe7a5e207 (patch)
tree5c1fb5f0beae4aba10f98e4353fe1965b5fe5ae2 /libavcodec/decode.c
parent79aa2ff1991593148b4e5eba0ff05f7a2f2f849e (diff)
downloadffmpeg-b3570f03893cc6f29472f418a144252fe7a5e207.tar.gz
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>
Diffstat (limited to 'libavcodec/decode.c')
-rw-r--r--libavcodec/decode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index e330f14826..708071fd07 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -413,9 +413,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
} else {
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->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
- frame->pkt_dts = pkt->dts;
if(!avctx->has_b_frames)
frame->pkt_pos = pkt->pos;
//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->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();