]> git.sesse.net Git - vlc/commitdiff
set stream->dr_dts according to i_dts instead AV_NOPTS_VALUE; seems to
authorIlkka Ollakka <ileoo@videolan.org>
Tue, 26 Feb 2008 07:14:43 +0000 (07:14 +0000)
committerIlkka Ollakka <ileoo@videolan.org>
Tue, 26 Feb 2008 07:14:43 +0000 (07:14 +0000)
fix that flv muxing issue, and doesn't seem to cause regression. fixes
#1285. Please notify if you notice something broken after this.

modules/codec/ffmpeg/mux.c

index c86b70f3278bc3604e78fc98aabf0fd97f39ad42..07b8a99f7aeecc9b4aaf26c6a4b93e922a2079d2 100644 (file)
@@ -367,7 +367,8 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
             I64C(1000000) / p_stream->time_base.num;
 
     /* this is another hack to prevent libavformat from triggering the "non monotone timestamps" check in avformat/utils.c */
-    p_stream->cur_dts = AV_NOPTS_VALUE;
+    p_stream->cur_dts = ( p_data->i_dts * p_stream->time_base.den /
+            I64C(1000000) / p_stream->time_base.num ) - 1;
 
     if( av_write_frame( p_sys->oc, &pkt ) < 0 )
     {