Revert "flacparse: fix header rewriting being ignored"

This caused broken metadata and also looks a bit dodgy.
Revert until we can figure out a solution that works for
all cases and doesn't break anything.

This reverts commit adeee44b07a173b9ab4253216caba8f66dd43abb.

https://bugzilla.gnome.org/show_bug.cgi?id=727802
https://bugzilla.gnome.org/show_bug.cgi?id=785558
diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c
index b1f729c..69a6928 100644
--- a/gst/audioparsers/gstflacparse.c
+++ b/gst/audioparsers/gstflacparse.c
@@ -208,8 +208,6 @@
 static gboolean gst_flac_parse_convert (GstBaseParse * parse,
     GstFormat src_format, gint64 src_value, GstFormat dest_format,
     gint64 * dest_value);
-static gboolean gst_flac_parse_sink_event (GstBaseParse * parse,
-    GstEvent * event);
 static gboolean gst_flac_parse_src_event (GstBaseParse * parse,
     GstEvent * event);
 static GstCaps *gst_flac_parse_get_sink_caps (GstBaseParse * parse,
@@ -245,7 +243,6 @@
   baseparse_class->pre_push_frame =
       GST_DEBUG_FUNCPTR (gst_flac_parse_pre_push_frame);
   baseparse_class->convert = GST_DEBUG_FUNCPTR (gst_flac_parse_convert);
-  baseparse_class->sink_event = GST_DEBUG_FUNCPTR (gst_flac_parse_sink_event);
   baseparse_class->src_event = GST_DEBUG_FUNCPTR (gst_flac_parse_src_event);
   baseparse_class->get_sink_caps =
       GST_DEBUG_FUNCPTR (gst_flac_parse_get_sink_caps);
@@ -318,8 +315,6 @@
   g_list_foreach (parser->headers, (GFunc) gst_mini_object_unref, NULL);
   g_list_free (parser->headers);
   parser->headers = NULL;
-  parser->header_size = 0;
-  parser->byte_mode = FALSE;
 }
 
 static void
@@ -797,11 +792,7 @@
     goto cleanup;
   }
 
-  if (flacparse->byte_mode && flacparse->byte_offset < flacparse->header_size) {
-    *skipsize = 0;
-    framesize = map.size;
-    goto cleanup;
-  } else if ((GST_READ_UINT16_BE (map.data) & 0xfffe) == 0xfff8) {
+  if ((GST_READ_UINT16_BE (map.data) & 0xfffe) == 0xfff8) {
     gboolean ret, is_first = !flacparse->strategy_checked;
     guint next;
 
@@ -1348,7 +1339,6 @@
 
   /* push header buffers; update caps, so when we push the first buffer the
    * negotiated caps will change to caps that include the streamheader field */
-  flacparse->header_size = 0;
   while (flacparse->headers) {
     GstBuffer *buf = GST_BUFFER (flacparse->headers->data);
     GstBaseParseFrame frame;
@@ -1361,7 +1351,6 @@
     gst_base_parse_frame_init (&frame);
     frame.buffer = buf;
     frame.overhead = -1;
-    flacparse->header_size += gst_buffer_get_size (frame.buffer);
     res = gst_base_parse_push_frame (GST_BASE_PARSE (flacparse), &frame);
     gst_base_parse_frame_free (&frame);
     if (res != GST_FLOW_OK)
@@ -1370,7 +1359,6 @@
   g_list_foreach (flacparse->headers, (GFunc) gst_mini_object_unref, NULL);
   g_list_free (flacparse->headers);
   flacparse->headers = NULL;
-  flacparse->byte_offset = flacparse->header_size;
 
   return res;
 }
@@ -1614,11 +1602,6 @@
     /* DROPPED because we pushed already or will push all headers manually */
     res = GST_BASE_PARSE_FLOW_DROPPED;
   } else {
-    if (flacparse->byte_mode && flacparse->byte_offset < flacparse->header_size) {
-      res = GST_FLOW_OK;
-      goto cleanup;
-    }
-
     if (flacparse->offset != GST_BUFFER_OFFSET (buffer)) {
       FrameHeaderCheckReturn ret;
 
@@ -1750,8 +1733,6 @@
 
   frame->flags |= GST_BASE_PARSE_FRAME_FLAG_CLIP;
 
-  flacparse->byte_offset += gst_buffer_get_size (frame->buffer);
-
   return GST_FLOW_OK;
 }
 
@@ -1788,34 +1769,6 @@
 }
 
 static gboolean
-gst_flac_parse_sink_event (GstBaseParse * parse, GstEvent * event)
-{
-  GstFlacParse *flacparse = GST_FLAC_PARSE (parse);
-  const GstSegment *segment;
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_SEGMENT:
-    {
-      gst_event_parse_segment (event, &segment);
-      flacparse->byte_mode = (segment->format == GST_FORMAT_BYTES)
-          && flacparse->header_size > 0;
-      if (flacparse->byte_mode) {
-        /* we must pass every header update now */
-        gst_base_parse_set_min_frame_size (GST_BASE_PARSE (flacparse), 0);
-        /* we must drain any pending data before the seek */
-        gst_base_parse_drain (parse);
-        flacparse->byte_offset = segment->start;
-        return gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (parse), event);
-      }
-      break;
-    }
-    default:
-      break;
-  }
-  return GST_BASE_PARSE_CLASS (parent_class)->sink_event (parse, event);
-}
-
-static gboolean
 gst_flac_parse_src_event (GstBaseParse * parse, GstEvent * event)
 {
   GstFlacParse *flacparse = GST_FLAC_PARSE (parse);
diff --git a/gst/audioparsers/gstflacparse.h b/gst/audioparsers/gstflacparse.h
index f4f36b9..55418df 100644
--- a/gst/audioparsers/gstflacparse.h
+++ b/gst/audioparsers/gstflacparse.h
@@ -86,10 +86,6 @@
   GstBuffer *seektable;
 
   gboolean force_variable_block_size;
-
-  gsize header_size;
-  gsize byte_offset;
-  gboolean byte_mode;
 };
 
 struct _GstFlacParseClass {