[FFmpeg-devel] [PATCH 2/6] lavc: warn when impossible to adjust timestamps for skipped samples.

Nicolas George nicolas.george at normalesup.org
Sun Jul 15 17:53:02 CEST 2012


It is likely to happen if pkt_timebase was not set.

Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 libavcodec/utils.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 5d5f5a4..dd9c0d1 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);
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list