[FFmpeg-cvslog] avformat/hlsenc: export inner muxer timebase

Michael Niedermayer git at videolan.org
Sun Oct 5 00:32:25 CEST 2014


ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 28 22:27:33 2014 +0200| [1d987a34d8b509e5de358805f34d46f873555370] | committer: Michael Niedermayer

avformat/hlsenc: export inner muxer timebase

Fixes "Non-monotonous DTS in output stream 0:0"
Fies Ticket 3797

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit b1a0fccd023d9261274a92ec9482da03c4aa82fa)

Conflicts:

	libavformat/hlsenc.c

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

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

 libavformat/hlsenc.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 11f1e5b..cc142fa 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -22,6 +22,7 @@
 #include <float.h>
 #include <stdint.h>
 
+#include "libavutil/avassert.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/parseutils.h"
 #include "libavutil/avstring.h"
@@ -251,6 +252,12 @@ static int hls_write_header(AVFormatContext *s)
     if ((ret = avformat_write_header(hls->avf, NULL)) < 0)
         goto fail;
 
+    av_assert0(s->nb_streams == hls->avf->nb_streams);
+    for (i = 0; i < s->nb_streams; i++) {
+        AVStream *inner_st  = hls->avf->streams[i];
+        AVStream *outter_st = s->streams[i];
+        avpriv_set_pts_info(outter_st, inner_st->pts_wrap_bits, inner_st->time_base.num, inner_st->time_base.den);
+    }
 
 fail:
     if (ret) {



More information about the ffmpeg-cvslog mailing list