[FFmpeg-cvslog] ffmpeg: update dts variables in transcode_audio()

Michael Niedermayer git at videolan.org
Wed Feb 8 16:55:31 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb  8 16:28:56 2012 +0100| [67700e877d9b77ada2dc3b4e56172be1243ae7e5] | committer: Michael Niedermayer

ffmpeg: update dts variables in transcode_audio()

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

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

 ffmpeg.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 9eefa4f..7b33871 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1970,12 +1970,15 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
     /* if the decoder provides a pts, use it instead of the last packet pts.
        the decoder could be delaying output by a packet or more. */
     if (decoded_frame->pts != AV_NOPTS_VALUE)
-        ist->pts = ist->next_pts = decoded_frame->pts;
+        ist->dts = ist->next_dts = ist->pts = ist->next_pts = decoded_frame->pts;
 
-    /* increment next_pts to use for the case where the input stream does not
+    /* increment next_dts to use for the case where the input stream does not
        have timestamps or there are multiple frames in the packet */
     ist->next_pts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) /
                      avctx->sample_rate;
+    ist->next_dts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) /
+                     avctx->sample_rate;
+
 
     // preprocess audio (volume)
     if (audio_volume != 256) {



More information about the ffmpeg-cvslog mailing list