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

reimar subversion at mplayerhq.hu
Fri Aug 31 22:08:45 CEST 2012


Author: reimar
Date: Fri Aug 31 22:08:44 2012
New Revision: 35134

Log:
Detect broken mpi usage count also in decoder.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Fri Aug 31 21:52:31 2012	(r35133)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Fri Aug 31 22:08:44 2012	(r35134)
@@ -707,6 +707,10 @@ static void release_buffer(struct AVCode
     if (mpi) {
         // release mpi (in case MPI_IMGTYPE_NUMBERED is used, e.g. for VDPAU)
         mpi->usage_count--;
+        if (mpi->usage_count < 0) {
+            mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Bad mp_image usage count, please report!\n");
+            mpi->usage_count = 0;
+        }
     }
 
     for(i=0; i<4; i++){


More information about the MPlayer-cvslog mailing list