From 8217575af134e2d216842830f2c87824f218cb6b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 1 May 2012 16:09:12 +0200 Subject: [PATCH] videodecoder: Add a reference to frame passed to subclass We have one reference owned by the internal frame list and one reference passed to the subclass. --- gst-libs/gst/video/gstvideodecoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 8ce54fb1a8..c95fb7d11a 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -64,7 +64,7 @@ * * * If codec processing results in decoded data, subclass should call - * @gst_video_decoder_finish_frame to have decoded data pushed + * @gst_video_decoder_finish_frame to have decoded data pushed. * downstream. * * @@ -2212,6 +2212,7 @@ gst_video_decoder_have_frame_2 (GstVideoDecoder * decoder) frame->pts); /* do something with frame */ + gst_video_codec_frame_ref (frame); ret = decoder_class->handle_frame (decoder, frame); if (ret != GST_FLOW_OK) GST_DEBUG_OBJECT (decoder, "flow error %s", gst_flow_get_name (ret));