diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-07-15 14:37:27 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-07-19 23:41:03 +0200 |
commit | 0e18ac561145c5b9afe1eeb8916293fb20639388 (patch) | |
tree | 1b982a0a2cf2efce18c47747c1e48f0d6ecf11ab | |
parent | 11ce1cf9a79954ecc9ac7640ba0c3dc9e0b34f4a (diff) | |
download | ffmpeg-0e18ac561145c5b9afe1eeb8916293fb20639388.tar.gz |
lavc: warn when impossible to adjust timestamps for skipped samples.
It is likely to happen if pkt_timebase was not set.
-rw-r--r-- | libavcodec/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 5d5f5a41a8..dd9c0d1675 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1668,6 +1668,8 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, frame->pkt_pts += av_rescale_q(avctx->internal->skip_samples,(AVRational){1, avctx->sample_rate}, avctx->pkt_timebase); if(frame->pkt_dts!=AV_NOPTS_VALUE) frame->pkt_dts += av_rescale_q(avctx->internal->skip_samples,(AVRational){1, avctx->sample_rate}, avctx->pkt_timebase); + } else { + av_log(avctx, AV_LOG_WARNING, "Could not update timestamps for skipped samples.\n"); } av_log(avctx, AV_LOG_DEBUG, "skip %d/%d samples\n", avctx->internal->skip_samples, frame->nb_samples); |