From 7fa4616598d7c85ef7a0f910f1af732f8b822ec6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 12 Nov 2012 15:14:09 +0100 Subject: [PATCH] omx: Fix refcount problem with frames being dropped because of decoder bugs --- omx/gstomxvideodec.c | 3 ++- omx/gstomxvideoenc.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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)); } } } -- 2.7.4