From: Sebastian Dröge Date: Mon, 12 Nov 2012 14:14:09 +0000 (+0100) Subject: omx: Fix refcount problem with frames being dropped because of decoder bugs X-Git-Tag: 1.19.3~501^2~744 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fa4616598d7c85ef7a0f910f1af732f8b822ec6;p=platform%2Fupstream%2Fgstreamer.git omx: Fix refcount problem with frames being dropped because of decoder bugs --- diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 4dc7d8e..03ccf5f 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -344,7 +344,8 @@ _find_nearest_frame (GstOMXVideoDec * self, GstOMXBuffer * buf) if (diff_ticks > MAX_FRAME_DIST_TICKS || diff_frames > MAX_FRAME_DIST_FRAMES) { - finish_frames = g_list_prepend (finish_frames, tmp); + finish_frames = + g_list_prepend (finish_frames, gst_video_codec_frame_ref (tmp)); } } } diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index ebd3afc..4e64466 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -582,7 +582,8 @@ _find_nearest_frame (GstOMXVideoEnc * self, GstOMXBuffer * buf) if (diff_ticks > MAX_FRAME_DIST_TICKS || diff_frames > MAX_FRAME_DIST_FRAMES) { - finish_frames = g_list_prepend (finish_frames, tmp); + finish_frames = + g_list_prepend (finish_frames, gst_video_codec_frame_ref (tmp)); } } }