From b30fa861d2c00940d3e7e6e54f20652ec8a18741 Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Sat, 6 Mar 2004 20:16:04 +0000 Subject: [PATCH] * transcode.c: fix for when 1st frame of non-low-delay streams only has a dts. --- modules/stream_out/transcode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/stream_out/transcode.c b/modules/stream_out/transcode.c index d817b5f584..b3305bd1fe 100644 --- a/modules/stream_out/transcode.c +++ b/modules/stream_out/transcode.c @@ -171,6 +171,7 @@ static int Open( vlc_object_t *p_this ) p_sys->i_threads = 0; p_sys->b_trellis = 0; p_sys->b_input_has_b_frames = VLC_FALSE; + p_sys->i_output_pts = 0; if( ( codec = sout_cfg_find_value( p_stream->p_cfg, "acodec" ) ) ) { @@ -1780,7 +1781,7 @@ static int transcode_video_ffmpeg_getframebuf(struct AVCodecContext *p_context, /* Some demuxers/packetizers only set the dts so let's try to find a * useful timestamp from this */ if( !p_context->has_b_frames || !p_sys->b_input_has_b_frames || - !p_frame->reference ) + !p_frame->reference || !p_sys->i_output_pts ) { p_frame->pts = p_sys->i_input_dts; }