From ed079b9e74253be92de8e8c7dd6df8d376bff4ff Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sun, 11 Oct 2015 12:06:26 +0100 Subject: [PATCH] qtmux: Allow negotiating to S8 as a raw format but stop making it best choice Negotiation to audio/x-raw,format=S8 was not possible because S8 does not have a bit order so we ended up doing `if (!entry.fourcc) goto refuse_caps;` https://bugzilla.gnome.org/show_bug.cgi?id=756387 --- gst/isomp4/gstqtmux.c | 2 ++ gst/isomp4/gstqtmuxmap.c | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index e83095a0f7..7f20f44f61 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -3555,6 +3555,8 @@ gst_qt_mux_audio_sink_set_caps (GstQTPad * qtpad, GstCaps * caps) entry.fourcc = FOURCC_sowt; else if (info.finfo->endianness == G_BIG_ENDIAN) entry.fourcc = FOURCC_twos; + else + entry.fourcc = FOURCC_sowt; /* maximum backward compatibility; only new version for > 16 bit */ if (info.finfo->depth <= 16) entry.version = 0; diff --git a/gst/isomp4/gstqtmuxmap.c b/gst/isomp4/gstqtmuxmap.c index 006f16d33c..1a8b6cec09 100644 --- a/gst/isomp4/gstqtmuxmap.c +++ b/gst/isomp4/gstqtmuxmap.c @@ -97,15 +97,11 @@ COMMON_AUDIO_CAPS (2, MAX) #define PCM_CAPS_FULL \ - PCM_CAPS "; " \ "audio/x-raw, " \ - "format = (string) { S24LE, S24BE }, " \ + "format = (string) { S32LE, S32BE, S24LE, S24BE }, " \ "layout = (string) interleaved, " \ COMMON_AUDIO_CAPS (2, MAX) "; " \ - "audio/x-raw, " \ - "format = (string) { S32LE, S32BE }, " \ - "layout = (string) interleaved, " \ - COMMON_AUDIO_CAPS (2, MAX) + PCM_CAPS #define MP3_CAPS \ "audio/mpeg, " \