mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
rsvg: Don't leak GstVideoCodecState
And avoid useless call to _get_output_state (set_output_state() already returns it). CID #1212160 CID #1212161
This commit is contained in:
parent
1b5e514a05
commit
adecec882a
1 changed files with 5 additions and 4 deletions
|
@ -180,11 +180,11 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, GstBuffer * buffer,
|
||||||
|| GST_VIDEO_INFO_HEIGHT (&output_state->info) != dimension.height) {
|
|| GST_VIDEO_INFO_HEIGHT (&output_state->info) != dimension.height) {
|
||||||
|
|
||||||
/* Create the output state */
|
/* Create the output state */
|
||||||
gst_video_decoder_set_output_state (decoder, GST_RSVG_VIDEO_FORMAT,
|
|
||||||
dimension.width, dimension.height, rsvg->input_state);
|
|
||||||
if (output_state)
|
if (output_state)
|
||||||
gst_video_codec_state_unref (output_state);
|
gst_video_codec_state_unref (output_state);
|
||||||
output_state = gst_video_decoder_get_output_state (decoder);
|
output_state =
|
||||||
|
gst_video_decoder_set_output_state (decoder, GST_RSVG_VIDEO_FORMAT,
|
||||||
|
dimension.width, dimension.height, rsvg->input_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = gst_video_decoder_allocate_output_frame (decoder, frame);
|
ret = gst_video_decoder_allocate_output_frame (decoder, frame);
|
||||||
|
@ -261,9 +261,10 @@ gst_rsvg_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
|
||||||
rsvg->input_state = gst_video_codec_state_ref (state);
|
rsvg->input_state = gst_video_codec_state_ref (state);
|
||||||
|
|
||||||
/* Create the output state */
|
/* Create the output state */
|
||||||
gst_video_decoder_set_output_state (decoder, GST_RSVG_VIDEO_FORMAT,
|
state = gst_video_decoder_set_output_state (decoder, GST_RSVG_VIDEO_FORMAT,
|
||||||
GST_VIDEO_INFO_WIDTH (info), GST_VIDEO_INFO_HEIGHT (info),
|
GST_VIDEO_INFO_WIDTH (info), GST_VIDEO_INFO_HEIGHT (info),
|
||||||
rsvg->input_state);
|
rsvg->input_state);
|
||||||
|
gst_video_codec_state_unref (state);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue