[MPlayer-cvslog] r35354 - trunk/libmpcodecs/vd_ffmpeg.c

reimar subversion at mplayerhq.hu
Mon Nov 5 22:37:25 CET 2012


Author: reimar
Date: Mon Nov  5 22:37:25 2012
New Revision: 35354

Log:
Check for NULL before using the pointer.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Mon Nov  5 22:23:46 2012	(r35353)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Mon Nov  5 22:37:25 2012	(r35354)
@@ -702,6 +702,7 @@ static void release_buffer(struct AVCode
         return;
     }
 
+    if (mpi) {
 //printf("release buffer %d %d %d\n", mpi ? mpi->flags&MP_IMGFLAG_PRESERVE : -99, ctx->ip_count, ctx->b_count);
 
         if(mpi->flags&MP_IMGFLAG_PRESERVE)
@@ -709,7 +710,6 @@ static void release_buffer(struct AVCode
         else
             ctx->b_count--;
 
-    if (mpi) {
         // release mpi (in case MPI_IMGTYPE_NUMBERED is used, e.g. for VDPAU)
         mpi->usage_count--;
         if (mpi->usage_count < 0) {


More information about the MPlayer-cvslog mailing list