Commit b30fa861 authored by Gildas Bazin's avatar Gildas Bazin

* transcode.c: fix for when 1st frame of non-low-delay streams only has a dts.

parent 87917c6a
...@@ -171,6 +171,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -171,6 +171,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_threads = 0; p_sys->i_threads = 0;
p_sys->b_trellis = 0; p_sys->b_trellis = 0;
p_sys->b_input_has_b_frames = VLC_FALSE; 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" ) ) ) 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, ...@@ -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 /* Some demuxers/packetizers only set the dts so let's try to find a
* useful timestamp from this */ * useful timestamp from this */
if( !p_context->has_b_frames || !p_sys->b_input_has_b_frames || 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; p_frame->pts = p_sys->i_input_dts;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment