Fixed potential NULL deference when flushing in avcodec encoder module.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 2 Nov 2010 19:59:54 +0000 (20:59 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 2 Nov 2010 20:18:13 +0000 (21:18 +0100)
modules/codec/avcodec/encoder.c

index 0981c1b..e2b36f8 100644 (file)
@@ -993,7 +993,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
                 p_sys->i_last_ref_pts = p_block->i_pts;
             }
         }
-        else
+        else if( p_pict )
         {
             /* Buggy libavcodec which doesn't update coded_frame->pts
              * correctly */