Commit ae0569f5 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/ffmpeg/encoder.c: ffmpeg doesn't segfault anymore if you set...

* modules/codec/ffmpeg/encoder.c: ffmpeg doesn't segfault anymore if you set the pts of input frames when doing mpeg4 video encoding.
  So let's use proper PTS now!
parent 29bffc40
......@@ -508,10 +508,14 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
frame.top_field_first = p_pict->b_top_field_first;
#endif
#if LIBAVCODEC_BUILD < 4702
/* Set the pts of the frame being encoded (segfaults with mpeg4!)*/
if( p_enc->fmt_out.i_codec == VLC_FOURCC( 'm', 'p', 'g', 'v' ) ||
p_enc->fmt_out.i_codec == VLC_FOURCC( 'm', 'p', '1', 'v' ) ||
p_enc->fmt_out.i_codec == VLC_FOURCC( 'm', 'p', '2', 'v' ) )
#else
if( 1 )
#endif
{
frame.pts = p_pict->date ? p_pict->date : AV_NOPTS_VALUE;
......
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