rsvg: Don't leak a GstVideoCodecState
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 4 Aug 2015 21:15:36 +0000 (23:15 +0200)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 4 Aug 2015 23:14:43 +0000 (19:14 -0400)
There's already the output_state variable with it, no need to
call gst_video_decoder_get_output_state() and get a new ref.

https://bugzilla.gnome.org/show_bug.cgi?id=753262

ext/rsvg/gstrsvgdec.c

index a17c935..c29b947 100644 (file)
@@ -203,8 +203,7 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, GstBuffer * buffer,
 
 
   if (!gst_video_frame_map (&vframe,
-          &gst_video_decoder_get_output_state (decoder)->info,
-          frame->output_buffer, GST_MAP_READWRITE)) {
+          &output_state->info, frame->output_buffer, GST_MAP_READWRITE)) {
     GST_ERROR_OBJECT (rsvg, "Failed to get SVG image");
     g_object_unref (handle);
     gst_video_codec_state_unref (output_state);