mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
wavpackparse: fix handling of correction streams
Accept wavpack correction streams (.wvc) on sink pad, so that wavpackparse can also be used to packetise correction streams. Fix parsing of subblock ID tags - the higher bits are flags and are not part of the ID. This resulted in correction blocks not being recognised properly and the output not having the right (correction) caps.
This commit is contained in:
parent
3da5144bbe
commit
0d88e3553a
1 changed files with 4 additions and 2 deletions
|
@ -61,7 +61,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS ("audio/x-wavpack"));
|
||||
GST_STATIC_CAPS ("audio/x-wavpack; audio/x-wavpack-correction"));
|
||||
|
||||
static void gst_wavpack_parse_finalize (GObject * object);
|
||||
|
||||
|
@ -325,7 +325,9 @@ gst_wavpack_parse_frame_metadata (GstWavpackParse * parse, GstBuffer * buf,
|
|||
CHECK (gst_byte_reader_get_data (&br, size + (size & 1), &data));
|
||||
gst_byte_reader_init (&mbr, data, size);
|
||||
|
||||
switch (id) {
|
||||
/* 0x1f is the metadata id mask and 0x20 flag is for later extensions
|
||||
* that do not need to be handled by the decoder */
|
||||
switch (id & 0x3f) {
|
||||
case ID_WVC_BITSTREAM:
|
||||
GST_LOG_OBJECT (parse, "correction bitstream");
|
||||
wpi->correction = TRUE;
|
||||
|
|
Loading…
Reference in a new issue