mpeg2dec: Release codec state on negotiation failures
authorEdward Hervey <bilboed@bilboed.com>
Fri, 9 May 2014 12:54:54 +0000 (14:54 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 9 May 2014 12:54:54 +0000 (14:54 +0200)
Else it leaks

CID #1212169

ext/mpeg2dec/gstmpeg2dec.c

index b50b475..28616c5 100644 (file)
@@ -808,6 +808,7 @@ invalid_size:
 negotiation_fail:
   {
     GST_WARNING_OBJECT (mpeg2dec, "Failed to negotiate with downstream");
+    gst_video_codec_state_unref (state);
     return GST_FLOW_ERROR;
   }
 }