summaryrefslogtreecommitdiffstats
path: root/gst/matroska/matroska-mux.c
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 /gst/matroska/matroska-mux.c
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.
Diffstat (limited to 'gst/matroska/matroska-mux.c')
-rw-r--r--gst/matroska/matroska-mux.c12
1 files changed, 9 insertions, 3 deletions
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) {