summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-08-09 14:02:27 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-08-09 14:02:27 +0000
commitb7dcc1908490d94b8c14b83f9683f3c802776ab6 (patch)
tree4957dd1968444e83586c60ff73985d5cc7bdc993
parentb6f5226f0415f1068f09d99ca4fc5cd4d819b175 (diff)
gst/matroska/matroska-mux.c: We need to drop one additional buffer for FLAC as the fLaC marker and STREAMINFO block a...
Original commit message from CVS: * gst/matroska/matroska-mux.c: (gst_matroska_mux_handle_sink_event), (flac_streamheader_to_codecdata): We need to drop one additional buffer for FLAC as the fLaC marker and STREAMINFO block are merged into one buffer in the caps. Also don't pretend to support NEWSEGMENT events, otherwise we will most probably write some invalid data.
-rw-r--r--ChangeLog11
-rw-r--r--gst/matroska/matroska-mux.c12
2 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9da815f0..bebd86fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2008-08-09 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * gst/matroska/matroska-mux.c:
+ (gst_matroska_mux_handle_sink_event),
+ (flac_streamheader_to_codecdata):
+ We need to drop one additional buffer for FLAC as the fLaC
+ marker and STREAMINFO block are merged into one buffer in the caps.
+
+ Also don't pretend to support NEWSEGMENT events, otherwise we
+ will most probably write some invalid data.
+
+2008-08-09 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
* gst/matroska/matroska-mux.c: (flac_streamheader_to_codecdata),
(gst_matroska_mux_audio_pad_setcaps):
Add support for muxing FLAC into Matroska containers.
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 044504d6..6138bcb4 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -484,7 +484,7 @@ gst_matroska_mux_handle_sink_event (GstPad * pad, GstEvent * event)
GstMatroskaPad *collect_pad;
GstMatroskaMux *mux;
GstTagList *list;
- gboolean ret;
+ gboolean ret = TRUE;
mux = GST_MATROSKA_MUX (gst_pad_get_parent (pad));
@@ -507,12 +507,18 @@ gst_matroska_mux_handle_sink_event (GstPad * pad, GstEvent * event)
}
break;
+ case GST_EVENT_NEWSEGMENT:
+ /* We don't support NEWSEGMENT events */
+ ret = FALSE;
+ gst_event_unref (event);
+ break;
default:
break;
}
/* now GstCollectPads can take care of the rest, e.g. EOS */
- ret = mux->collect_event (pad, event);
+ if (ret)
+ ret = mux->collect_event (pad, event);
gst_object_unref (mux);
return ret;
@@ -948,7 +954,7 @@ flac_streamheader_to_codecdata (const GValue * streamheader,
return FALSE;
}
- context->xiph_headers_to_skip = bufarr->len;
+ context->xiph_headers_to_skip = bufarr->len + 1;
bufval = &g_array_index (bufarr, GValue, 0);
if (G_VALUE_TYPE (bufval) != GST_TYPE_BUFFER) {