buffer-sharing: fix bug of vaapi buffer leak
authorWind Yuan <feng.yuan@intel.com>
Fri, 8 Feb 2013 13:57:58 +0000 (15:57 +0200)
committerJussi Saavalainen <jussi.saavalainen@ixonos.com>
Fri, 8 Feb 2013 14:00:30 +0000 (16:00 +0200)
Change-Id: Iac052b8fdfcda619b8293311c42c92929b4988ed

gst/mfldv4l2cam/v4l2camsrc_calls.c

index d6a600a..57f6bc1 100644 (file)
@@ -594,7 +594,6 @@ gst_v4l2camsrc_buffer_pool_destroy (GstMFLDV4l2CamSrcBufferPool * pool,
 
   g_mutex_lock (pool->lock);
   pool->running = FALSE;
-  pool->is_vaapi_sharing = FALSE;
   g_mutex_unlock (pool->lock);
 
   GST_DEBUG ("destroy pool");
@@ -624,7 +623,7 @@ gst_v4l2camsrc_buffer_pool_destroy (GstMFLDV4l2CamSrcBufferPool * pool,
       gst_buffer_unref (buf);
     }
   }
-
+  pool->is_vaapi_sharing = FALSE;
   gst_mini_object_unref (GST_MINI_OBJECT (pool));
 }