[vlc-commits] commit: Fixed potential NULL deference when flushing in avcodec encoder module. ( Laurent Aimar )

git at videolan.org git at videolan.org
Tue Nov 2 21:20:44 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Nov  2 20:59:54 2010 +0100| [edd1cb880b252a6b2dd74dfcbafdb3bef433313f] | committer: Laurent Aimar 

Fixed potential NULL deference when flushing in avcodec encoder module.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=edd1cb880b252a6b2dd74dfcbafdb3bef433313f
---

 modules/codec/avcodec/encoder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 0981c1b..e2b36f8 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -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 */



More information about the vlc-commits mailing list