gstreamer/gst
Charlie Turner 39d32b2394 qtdemux: Find mp4a esds atoms in protected streams sample description tables.
This problem was found in Test. 2 of the YouTube 2018 EME
tests[1]. The code was accidentally not finding an mp4a's esds atom in
the sample description table when the stream was encrypted. It assumed
that if the stream is protected, then only an enca atom will be found
here. What happens with YouTube is they often provide protected
content with a few seconds of clear content, and then switch to the
encrypted stream.

The failure case here was an incorrect codec_data field being sent
into aacparse. The advertisement of stereo audio @ 44.1kHz for the
mp4a (unprotected) stream was incorrect. As usual, the esds contained
the real values here which were mono at 22050 Hz.

Here's what the MP4 tree looks like for these types of files,
demonstrating why the code was making a wrong assumption (or maybe
YouTube is being unusual),

[ftyp] size=8+16
...
[moov] size=8+1571
...
  [trak] size=8+559
...
          [stsd] size=12+234
            entry-count = 2
            [enca] size=8+147
              channel_count = 2
              sample_size = 16
              sample_rate = 44100
              [esds] size=12+27
                ...
            ...
            [mp4a] size=8+67
              channel_count = 2
              sample_size = 16
              sample_rate = 44100
              [esds] size=12+27
                ...

In addition to fixing this, the checks for esds atoms in mp4a and mp4v
have been made symmetrical. While I haven't seen a test case for video
with the same problem, it seemed better to make the same checks. This
also fixes a crash reported from another user[2], they also noted the
asymmetry with mp4v and mp4a.

[1] https://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/2018.html?test_type=encryptedmedia-test
[2] https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/398
2019-03-15 12:41:33 +00:00
..
alpha Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
apetag Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
audiofx audiofx: add stereo element which was moved from -bad to build 2018-12-25 16:10:49 +01:00
audioparsers flacparse: On sink caps change restart parser 2018-12-14 09:22:33 +00:00
auparse Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
autodetect Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
avi avidemux: fix misleading debug line 2018-10-18 15:50:19 +02:00
cutter Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
debugutils Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
deinterlace meson: Replace empty configuration_data() with copy keyword 2018-10-17 14:15:33 +01:00
dtmf dtmfsrc: Declare output as interleaved 2018-10-28 17:12:59 +00:00
effectv Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
equalizer Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
flv flvmux: Fix scale of time values in warning message 2019-03-15 09:55:32 +00:00
flx Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
goom Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
goom2k1 Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
icydemux icydemux: avoid timestamp field initialisation for tag event 2018-05-07 01:25:25 +10:00
id3demux Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
imagefreeze imagefreeze: add a num-buffers property 2019-03-14 09:12:28 +01:00
interleave deinterleave: Allow switching between 1 channel configs 2019-01-28 23:23:41 +00:00
isomp4 qtdemux: Find mp4a esds atoms in protected streams sample description tables. 2019-03-15 12:41:33 +00:00
law Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
level Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
matroska matroskamux: add support for new color primaries 2019-03-12 16:52:45 +01:00
monoscope Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
multifile splitmuxsrc: Refactor part preparation code and remove "prepared" signal from reader helper object 2019-01-09 13:35:58 +02:00
multipart Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
replaygain Revert "BugFix : Change peak value to normalize audio file with fallback gain" 2018-05-15 10:35:09 +01:00
rtp rtpulpfdecdec: only put recovered packet back into storage if not recovered from there 2019-03-06 19:40:10 +00:00
rtpmanager rtpsource: fix documentation of rtp_source_send_rtp parameters 2019-03-07 12:41:40 +01:00
rtsp rtspsrc: Don't remove udpsrc/sink from rtspsrc if they were not added to it 2019-03-15 08:21:11 +00:00
shapewipe Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
smpte Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
spectrum Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
udp docs: fix typos s/recieve/receive/ 2019-03-07 12:41:40 +01:00
videobox meson: Replace empty configuration_data() with copy keyword 2018-10-17 14:15:33 +01:00
videocrop aspectcropration: Fix potential unref of NULL pointer 2018-11-26 08:11:57 -03:00
videofilter Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
videomixer meson: Replace empty configuration_data() with copy keyword 2018-10-17 14:15:33 +01:00
wavenc Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
wavparse wavparse: Declare support for RF64 2019-02-24 14:29:27 +00:00
y4m Meson: Generate pc file for all plugins in good 2018-04-25 11:07:06 +01:00
Makefile.am build: build plugins and examples in parallel where possible 2010-03-29 11:00:57 +01:00
meson.build meson: Add feature options for all plugins 2018-07-27 18:42:54 +05:30