[FFmpeg-cvslog] ff_samples_to_time_base: support AV_NOPTS_VALUE

Michael Niedermayer git at videolan.org
Wed Apr 11 20:59:59 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 11 20:23:27 2012 +0200| [6952301f33add347906af4d3e10b36a57d933ce0] | committer: Michael Niedermayer

ff_samples_to_time_base: support AV_NOPTS_VALUE

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6952301f33add347906af4d3e10b36a57d933ce0
---

 libavcodec/internal.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index dfef6eb..2686468 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -153,6 +153,8 @@ int ff_alloc_packet(AVPacket *avpkt, int size);
 static av_always_inline int64_t ff_samples_to_time_base(AVCodecContext *avctx,
                                                         int64_t samples)
 {
+    if(samples == AV_NOPTS_VALUE)
+        return AV_NOPTS_VALUE;
     return av_rescale_q(samples, (AVRational){ 1, avctx->sample_rate },
                         avctx->time_base);
 }



More information about the ffmpeg-cvslog mailing list