mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
theoradec: Unref state when we're done with it
This commit is contained in:
parent
bcef106f73
commit
0c2f43750d
1 changed files with 5 additions and 1 deletions
|
@ -798,12 +798,14 @@ static gboolean
|
||||||
theora_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
theora_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
||||||
{
|
{
|
||||||
GstTheoraDec *dec = GST_THEORA_DEC (decoder);
|
GstTheoraDec *dec = GST_THEORA_DEC (decoder);
|
||||||
GstVideoCodecState *state = gst_video_decoder_get_output_state (decoder);
|
GstVideoCodecState *state;
|
||||||
GstBufferPool *pool;
|
GstBufferPool *pool;
|
||||||
gboolean update;
|
gboolean update;
|
||||||
guint size, min, max;
|
guint size, min, max;
|
||||||
GstStructure *config;
|
GstStructure *config;
|
||||||
|
|
||||||
|
state = gst_video_decoder_get_output_state (decoder);
|
||||||
|
|
||||||
if (gst_query_get_n_allocation_pools (query) > 0) {
|
if (gst_query_get_n_allocation_pools (query) > 0) {
|
||||||
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
|
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
|
||||||
|
|
||||||
|
@ -850,6 +852,8 @@ theora_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
||||||
if (pool)
|
if (pool)
|
||||||
gst_object_unref (pool);
|
gst_object_unref (pool);
|
||||||
|
|
||||||
|
gst_video_codec_state_unref (state);
|
||||||
|
|
||||||
return GST_VIDEO_DECODER_CLASS (parent_class)->decide_allocation (decoder,
|
return GST_VIDEO_DECODER_CLASS (parent_class)->decide_allocation (decoder,
|
||||||
query);
|
query);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue