mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-07 03:56:28 +02:00
* transcode.c: fix for when 1st frame of non-low-delay streams only has a dts.
This commit is contained in:
parent
87917c6a0c
commit
b30fa861d2
@ -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,
|
|||||||
/* 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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user