summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2013-09-05 02:05:52 -0600
committerSebastian Dröge <sebastian@centricular.com>2014-03-03 20:12:35 +0100
commitbf0d2614c37491e145c03687691049b92838ea74 (patch)
treef1d4b5a2f3c3d361ada44822aa0ec35645224da4
parent8b06b07f6fdff4612d404eb99268c7a7325179b6 (diff)
omxvideodec: remove dead code
This code doesn't seems to be used for quite a while, remove it before it starts to rot. https://bugzilla.gnome.org/show_bug.cgi?id=724236
-rw-r--r--omx/gstomxvideodec.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index c2fbd8f..8cdf2f5 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1008,19 +1008,13 @@ gst_omx_video_dec_change_state (GstElement * element, GstStateChange transition)
return ret;
}
-#define MAX_FRAME_DIST_TICKS (5 * OMX_TICKS_PER_SECOND)
-#define MAX_FRAME_DIST_FRAMES (100)
-
static GstVideoCodecFrame *
_find_nearest_frame (GstOMXVideoDec * self, GstOMXBuffer * buf)
{
- GList *l, *best_l = NULL;
- GList *finish_frames = NULL;
GstVideoCodecFrame *best = NULL;
- guint64 best_timestamp = 0;
guint64 best_diff = G_MAXUINT64;
- BufferIdentification *best_id = NULL;
GList *frames;
+ GList *l;
frames = gst_video_decoder_get_frames (GST_VIDEO_DECODER (self));
@@ -1045,10 +1039,7 @@ _find_nearest_frame (GstOMXVideoDec * self, GstOMXBuffer * buf)
if (best == NULL || diff < best_diff) {
best = tmp;
- best_timestamp = timestamp;
best_diff = diff;
- best_l = l;
- best_id = id;
/* For frames without timestamp we simply take the first frame */
if ((buf->omx_buf->nTimeStamp == 0 && timestamp == 0) || diff == 0)
@@ -1056,43 +1047,6 @@ _find_nearest_frame (GstOMXVideoDec * self, GstOMXBuffer * buf)
}
}
- if (FALSE && best_id) {
- for (l = frames; l && l != best_l; l = l->next) {
- GstVideoCodecFrame *tmp = l->data;
- BufferIdentification *id = gst_video_codec_frame_get_user_data (tmp);
- guint64 diff_ticks, diff_frames;
-
- /* This happens for frames that were just added but
- * which were not passed to the component yet. Ignore
- * them here!
- */
- if (!id)
- continue;
-
- if (id->timestamp > best_timestamp)
- break;
-
- if (id->timestamp == 0 || best_timestamp == 0)
- diff_ticks = 0;
- else
- diff_ticks = best_timestamp - id->timestamp;
- diff_frames = best->system_frame_number - tmp->system_frame_number;
-
- if (diff_ticks > MAX_FRAME_DIST_TICKS
- || diff_frames > MAX_FRAME_DIST_FRAMES) {
- finish_frames =
- g_list_prepend (finish_frames, gst_video_codec_frame_ref (tmp));
- }
- }
- }
-
- if (FALSE && finish_frames) {
- g_warning ("Too old frames, bug in decoder -- please file a bug");
- for (l = finish_frames; l; l = l->next) {
- gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), l->data);
- }
- }
-
if (best)
gst_video_codec_frame_ref (best);