Commit 425be35c authored by Aman Gupta's avatar Aman Gupta

avcodec/mediacodecdec_common: warn when PTS is missing

MediaCodec decoders require PTS for proper operation.
Signed-off-by: 's avatarAman Gupta <aman@tmm1.net>
Signed-off-by: 's avatarMatthieu Bouron <matthieu.bouron@gmail.com>
parent 558265d4
......@@ -612,7 +612,11 @@ int ff_mediacodec_dec_send(AVCodecContext *avctx, MediaCodecDecContext *s,
}
pts = pkt->pts;
if (pts != AV_NOPTS_VALUE && avctx->pkt_timebase.num && avctx->pkt_timebase.den) {
if (pts == AV_NOPTS_VALUE) {
av_log(avctx, AV_LOG_WARNING, "Input packet is missing PTS\n");
pts = 0;
}
if (pts && avctx->pkt_timebase.num && avctx->pkt_timebase.den) {
pts = av_rescale_q(pts, avctx->pkt_timebase, AV_TIME_BASE_Q);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment