mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-03 16:09:39 +00:00
matroskamux: Error out if ADPCM caps don't contain the layout field
This commit is contained in:
parent
bbb5a2853e
commit
2cddf3a0a9
1 changed files with 7 additions and 0 deletions
|
@ -1944,11 +1944,18 @@ gst_matroska_mux_audio_pad_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
bitrate = block_align * samplerate;
|
bitrate = block_align * samplerate;
|
||||||
} else if (!strcmp (mimetype, "audio/x-adpcm")) {
|
} else if (!strcmp (mimetype, "audio/x-adpcm")) {
|
||||||
const char *layout;
|
const char *layout;
|
||||||
|
|
||||||
layout = gst_structure_get_string (structure, "layout");
|
layout = gst_structure_get_string (structure, "layout");
|
||||||
|
if (!layout) {
|
||||||
|
GST_WARNING_OBJECT (mux, "Missing layout on adpcm caps");
|
||||||
|
goto refuse_caps;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gst_structure_get_int (structure, "block_align", &block_align)) {
|
if (!gst_structure_get_int (structure, "block_align", &block_align)) {
|
||||||
GST_WARNING_OBJECT (mux, "Missing block_align on adpcm caps");
|
GST_WARNING_OBJECT (mux, "Missing block_align on adpcm caps");
|
||||||
goto refuse_caps;
|
goto refuse_caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp (layout, "dvi")) {
|
if (!strcmp (layout, "dvi")) {
|
||||||
format = GST_RIFF_WAVE_FORMAT_DVI_ADPCM;
|
format = GST_RIFF_WAVE_FORMAT_DVI_ADPCM;
|
||||||
} else if (!strcmp (layout, "g726")) {
|
} else if (!strcmp (layout, "g726")) {
|
||||||
|
|
Loading…
Reference in a new issue