Commit 1e0a7a8c authored by Ilkka Ollakka's avatar Ilkka Ollakka

avcodec: settings pts doesn't segfault with mp4v

parent aba8eb02
...@@ -871,9 +871,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict ) ...@@ -871,9 +871,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
frame->interlaced_frame = !p_pict->b_progressive; frame->interlaced_frame = !p_pict->b_progressive;
frame->top_field_first = !!p_pict->b_top_field_first; frame->top_field_first = !!p_pict->b_top_field_first;
/* Set the pts of the frame being encoded (segfaults with mpeg4!)*/ /* Set the pts of the frame being encoded */
if( p_enc->fmt_out.i_codec != VLC_CODEC_MP4V )
{
frame->pts = p_pict->date ? p_pict->date : (int64_t)AV_NOPTS_VALUE; frame->pts = p_pict->date ? p_pict->date : (int64_t)AV_NOPTS_VALUE;
if ( p_sys->b_hurry_up && frame->pts != (int64_t)AV_NOPTS_VALUE ) if ( p_sys->b_hurry_up && frame->pts != (int64_t)AV_NOPTS_VALUE )
...@@ -912,11 +910,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict ) ...@@ -912,11 +910,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
/* msg_Dbg( p_enc, "hurry up mode 1 %lld", current_date + HURRY_UP_GUARD1 - frame.pts ); */ /* msg_Dbg( p_enc, "hurry up mode 1 %lld", current_date + HURRY_UP_GUARD1 - frame.pts ); */
} }
} }
}
else
{
frame->pts = (int64_t)AV_NOPTS_VALUE;
}
if ( frame->pts != (int64_t)AV_NOPTS_VALUE && frame->pts != 0 ) if ( frame->pts != (int64_t)AV_NOPTS_VALUE && frame->pts != 0 )
{ {
......
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