mpeg2dec: Unmap output video frame if copying to it fails
authorSatya Prakash Gupta <sp.gupta@samsung.com>
Thu, 7 Sep 2017 07:57:26 +0000 (13:27 +0530)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 7 Sep 2017 09:56:11 +0000 (12:56 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=787398

ext/mpeg2dec/gstmpeg2dec.c

index 48f294e..5889055 100644 (file)
@@ -527,6 +527,7 @@ map_fail:
 copy_failed:
   {
     GST_ERROR_OBJECT (dec, "Failed to copy output frame");
+    gst_video_frame_unmap (&output_frame);
     gst_video_codec_state_unref (state);
     return GST_FLOW_ERROR;
   }