omx: Fix refcount problem with frames being dropped because of decoder bugs

This commit is contained in:
Sebastian Dröge 2012-11-12 15:14:09 +01:00
parent 2481ceb8c4
commit 7fa4616598
2 changed files with 4 additions and 2 deletions

View file

@ -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));
}
}
}

View file

@ -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));
}
}
}