summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2013-09-05 02:05:52 -0600
committerChristian König <christian.koenig@amd.com>2014-02-07 05:50:56 -0700
commit45a91c687ea3a2ce80fcffcdea413b9dcac55242 (patch)
tree6ab04330cd2ffcbb777e2105e4022923c4b0a3a1
parentc223d8863624a93cd969b421b302df5d74f7fbaf (diff)
gstomxvideodec: remove dead code
This code doesn't seems to be used for quite a while, remove it before it starts to rot. Signed-off-by: Christian König <christian.koenig@amd.com>
-rw-r--r--omx/gstomxvideodec.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 0d8801e..6b5cbe3 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);