From 283c3fb6f2098e7ccb2a02491c965eba31eced26 Mon Sep 17 00:00:00 2001 From: rtognimp Date: Sun, 6 Jun 2004 13:48:30 +0000 Subject: Segfault fix for some h264 in avi files Patch by adland git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12535 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmpcodecs/vd_ffmpeg.c') diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 6716995b20..5cd3a9a6ef 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -644,7 +644,7 @@ static void release_buffer(struct AVCodecContext *avctx, AVFrame *pic){ } // Palette support: free palette buffer allocated in get_buffer - if ((mpi->bpp == 8) && (mpi->planes[1] != NULL)) + if ( mpi && (mpi->bpp == 8) && (mpi->planes[1] != NULL)) free(mpi->planes[1]); #if LIBAVCODEC_BUILD >= 4644 -- cgit v1.2.3