Commit c7fdd09e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Backport [18549] and extend it.

I am very suspicious about the original commit to trunk by the way
(Why is signed int wrong in one place and right in the others?
 Could be, but really looks unlikely to me)
parent 7d901182
......@@ -791,9 +791,9 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
if( 1 )
#endif
{
frame.pts = p_pict->date ? p_pict->date : (signed int) AV_NOPTS_VALUE;
frame.pts = p_pict->date ? p_pict->date : AV_NOPTS_VALUE;
if ( p_sys->b_hurry_up && frame.pts != (signed int) AV_NOPTS_VALUE )
if ( p_sys->b_hurry_up && frame.pts != AV_NOPTS_VALUE )
{
mtime_t current_date = mdate();
......@@ -839,7 +839,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
frame.pts = AV_NOPTS_VALUE;
}
if ( frame.pts != (signed int) AV_NOPTS_VALUE && frame.pts != 0 )
if ( frame.pts != AV_NOPTS_VALUE && frame.pts != 0 )
{
if ( p_sys->i_last_pts == frame.pts )
{
......@@ -891,7 +891,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
/* No delay -> output pts == input pts */
p_block->i_pts = p_block->i_dts = p_pict->date;
}
else if( p_sys->p_context->coded_frame->pts != (signed int) AV_NOPTS_VALUE &&
else if( p_sys->p_context->coded_frame->pts != AV_NOPTS_VALUE &&
p_sys->p_context->coded_frame->pts != 0 &&
p_sys->i_buggy_pts_detect != p_sys->p_context->coded_frame->pts )
{
......
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