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
This commit is contained in:
rtognimp 2004-06-06 13:48:30 +00:00
parent 02e5778806
commit 283c3fb6f2
1 changed files with 1 additions and 1 deletions

View File

@ -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