diff options
author | Jan Urbanski <wulczer@wulczer.org> | 2009-08-04 12:58:35 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-08-04 12:58:35 +0200 |
commit | 5a596e67dafefcebc85d270364bf7508e7edbcd5 (patch) | |
tree | 204243e700ebeb19a81387067bd49282b17c1155 /gst | |
parent | de03453f6d3e284de1247ada864e45f010d126e4 (diff) | |
download | gst-plugins-bad-5a596e67dafefcebc85d270364bf7508e7edbcd5.tar.gz gst-plugins-bad-5a596e67dafefcebc85d270364bf7508e7edbcd5.tar.bz2 gst-plugins-bad-5a596e67dafefcebc85d270364bf7508e7edbcd5.zip |
qtmux: Don't require endianness field for 8 bit raw audio
Fixes bug #590360.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/qtmux/gstqtmux.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c index ba155f6a..f1001966 100644 --- a/gst/qtmux/gstqtmux.c +++ b/gst/qtmux/gstqtmux.c @@ -1553,10 +1553,16 @@ gst_qt_mux_audio_sink_set_caps (GstPad * pad, GstCaps * caps) if (!gst_structure_get_int (structure, "width", &width) || !gst_structure_get_int (structure, "depth", &depth) || - !gst_structure_get_boolean (structure, "signed", &sign) || - !gst_structure_get_int (structure, "endianness", &endianness)) { - GST_DEBUG_OBJECT (qtmux, - "broken caps, width/depth/signed/endianness field missing"); + !gst_structure_get_boolean (structure, "signed", &sign)) { + GST_DEBUG_OBJECT (qtmux, "broken caps, width/depth/signed field missing"); + goto refuse_caps; + } + + if (depth <= 8) { + endianness = G_BYTE_ORDER; + } else if (!gst_structure_get_boolean (structure, + "endianness", &endianness)) { + GST_DEBUG_OBJECT (qtmux, "broken caps, endianness field missing"); goto refuse_caps; } |