mfc: Fix double-unmap of the codec data
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 26 Dec 2012 12:30:23 +0000 (13:30 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 31 Dec 2012 14:59:07 +0000 (15:59 +0100)
sys/mfc/gstmfcdec.c

index 5e2c9d01fd61d99dd8ba38f7d95a12d36901b45a..b00324ed22126dda5cfa2d318f33ec1552c42d5e 100644 (file)
@@ -293,14 +293,12 @@ gst_mfc_dec_queue_input (GstMFCDec * self, GstVideoCodecFrame * frame)
     mfc_buffer_set_input_size (mfc_inbuf, map.size);
 
     gst_buffer_unmap (inbuf, &map);
+    gst_buffer_replace (&self->codec_data, NULL);
+    inbuf = NULL;
 
     timestamp.tv_usec = 0;
     timestamp.tv_sec = -1;
 
-    gst_buffer_unmap (self->codec_data, &map);
-    gst_buffer_replace (&self->codec_data, NULL);
-    inbuf = NULL;
-
     if ((mfc_ret =
             mfc_dec_enqueue_input (self->context, mfc_inbuf, &timestamp)) < 0)
       goto enqueue_error;