]> git.sesse.net Git - vlc/commitdiff
* modules/codec/ffmpeg/encoder.c: ffmpeg doesn't segfault anymore if you set the...
authorGildas Bazin <gbazin@videolan.org>
Tue, 13 Apr 2004 14:13:07 +0000 (14:13 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 13 Apr 2004 14:13:07 +0000 (14:13 +0000)
  So let's use proper PTS now!

modules/codec/ffmpeg/encoder.c

index 1c4649f22eca9f27633b9b3d447ccdba192aa645..6e3ee30f48081cbbef9e36c6c663d171f983fdc1 100644 (file)
@@ -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;