qtdemux: extract bit depth from codec data for ALAC
authorTim-Philipp Müller <tim@centricular.com>
Fri, 31 Jul 2020 10:05:02 +0000 (11:05 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 31 Jul 2020 10:05:02 +0000 (11:05 +0100)
The info in the sound sample description might not be
accurate if it's an older version atom.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/771

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/686>

gst/isomp4/qtdemux.c

index 5b79ace..9f714b0 100644 (file)
@@ -12384,6 +12384,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
                 entry->bytes_per_frame = QT_UINT32 (alac_data + 12);
                 entry->n_channels = QT_UINT8 (alac_data + 21);
                 entry->rate = QT_UINT32 (alac_data + 32);
+                samplesize = QT_UINT8 (alac_data + 16 + 1);
               }
             }
             gst_caps_set_simple (entry->caps,