From bc4789a05a07c029e4961d77c983f9ad555fcca4 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Tue, 26 Feb 2008 07:14:43 +0000 Subject: [PATCH] set stream->dr_dts according to i_dts instead AV_NOPTS_VALUE; seems to 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/codec/ffmpeg/mux.c b/modules/codec/ffmpeg/mux.c index c86b70f327..07b8a99f7a 100644 --- a/modules/codec/ffmpeg/mux.c +++ b/modules/codec/ffmpeg/mux.c @@ -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 ) { -- 2.39.2