summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-07-10 15:50:50 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-07-10 15:50:50 +0200
commitccbb7657431f6652c1e114b07bb8d5fe09a1a953 (patch)
tree91f5059b53abac6fa47f241208a2a7f5461fe07f /gst-libs
parent68ab7e509c11a5285fd7c2c5280547d69617aece (diff)
basevideodecoder: Fix memory leak
The timestamps are only used if the output adapter is used, not if complete frames are provided by the decoder and finish_frame() is called and even in the case where the output adapter is used they might not be used and are leaked.
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/video/gstbasevideodecoder.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst-libs/gst/video/gstbasevideodecoder.c b/gst-libs/gst/video/gstbasevideodecoder.c
index b1a97eb43..90b4e6ca1 100644
--- a/gst-libs/gst/video/gstbasevideodecoder.c
+++ b/gst-libs/gst/video/gstbasevideodecoder.c
@@ -927,6 +927,9 @@ gst_base_video_decoder_change_state (GstElement * element,
if (base_video_decoder_class->stop) {
base_video_decoder_class->stop (base_video_decoder);
}
+ g_list_foreach (base_video_decoder->timestamps, (GFunc) g_free, NULL);
+ g_list_free (base_video_decoder->timestamps);
+ base_video_decoder->timestamps = NULL;
break;
default:
break;