[FFmpeg-cvslog] mpegtsenc: prevent pcr_packet_period==0

Michael Niedermayer git at videolan.org
Sun Jun 10 16:53:25 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 10 16:50:06 2012 +0200| [91bdced363cd21250b55667b6dbef96c676d26fc] | committer: Michael Niedermayer

mpegtsenc: prevent pcr_packet_period==0

a period of 1 is the smallest that makes sense

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

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

 libavformat/mpegtsenc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index fd30e70..3517d74 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -659,6 +659,8 @@ static int mpegts_write_header(AVFormatContext *s)
             service->pcr_packet_period =
                 pcr_st->codec->time_base.den/(10*pcr_st->codec->time_base.num);
         }
+        if(!service->pcr_packet_period)
+            service->pcr_packet_period = 1;
     }
 
     // output a PCR as soon as possible



More information about the ffmpeg-cvslog mailing list