Commit e36bd9a7 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

rawvideo: only init the date once

No need to do it with invalid values and then check it's valid.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 78e426da
......@@ -103,8 +103,6 @@ static int OpenCommon( decoder_t *p_dec, bool b_packetizer )
if ( !b_packetizer )
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
date_Init( &p_sys->pts, p_dec->fmt_out.video.i_frame_rate,
p_dec->fmt_out.video.i_frame_rate_base );
if( p_dec->fmt_out.video.i_frame_rate == 0 ||
p_dec->fmt_out.video.i_frame_rate_base == 0)
{
......@@ -113,6 +111,9 @@ static int OpenCommon( decoder_t *p_dec, bool b_packetizer )
p_dec->fmt_out.video.i_frame_rate_base);
date_Init( &p_sys->pts, 25, 1 );
}
else
date_Init( &p_sys->pts, p_dec->fmt_out.video.i_frame_rate,
p_dec->fmt_out.video.i_frame_rate_base );
for( unsigned i = 0; i < dsc->plane_count; i++ )
{
......
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