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.
This commit is contained in:
Sebastian Dröge 2008-08-09 14:02:27 +00:00
parent b6f5226f04
commit b7dcc19084
2 changed files with 20 additions and 3 deletions

View file

@ -1,3 +1,14 @@
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),

View file

@ -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));
@ -506,12 +506,18 @@ gst_matroska_mux_handle_sink_event (GstPad * pad, GstEvent * event)
mux->tags = gst_tag_list_copy (list);
}
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 */
if (ret)
ret = mux->collect_event (pad, event);
gst_object_unref (mux);
@ -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) {