After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761769 - qtdemux: incorrectly sets caps of CENC encrypted streams
qtdemux: incorrectly sets caps of CENC encrypted streams
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal blocker
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-09 13:17 UTC by A Ashley
Modified: 2016-02-17 15:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
qtdemux: only transform protected caps once (2.09 KB, patch)
2016-02-09 13:32 UTC, A Ashley
committed Details | Review

Description A Ashley 2016-02-09 13:17:02 UTC
Commit 7873bede3134b15e5066e8d14e54d1f5054d2063 (https://bugzilla.gnome.org/show_bug.cgi?id=760774) changed the behaviour of qtdemux to call gst_qtdemux_configure_stream() for every new moof.

When playing a protected stream, gst_qtdemux_configure_stream() calls gst_qtdemux_configure_protected_caps(). The gst_qtdemux_configure_protected_caps() function takes the original media format, puts this in a field called "original-media-type" and then changes the caps to "application/x-cenc".

The gst_qtdemux_configure_protected_caps() does not handle the case of being called multiple times, causing it to incorrectly set the caps. The second call causes the caps to be set to:

    application/x-cenc, original-media-type"application/x-cenc"
Comment 1 A Ashley 2016-02-09 13:32:13 UTC
Created attachment 320711 [details] [review]
qtdemux: only transform protected caps once
Comment 2 A Ashley 2016-02-09 14:02:58 UTC
To reproduce the bug (and check the patch fixes it):

    git clone https://github.com/asrashley/gst-cencdec.git
    cd gst-cencdec
    ./autogen
    make
    ./store-key.py 00000000000000000000000000000000 0123456789ABCDEF0123456789ABCDEF
    ./store-key.py 0bbc0bbc0bbc0bbc0bbc0bbc0bbc1bbc ABCDEF0123456789ABCDEF0123456789
    env GST_PLUGIN_PATH=${PWD}/src/.libs:${GST_PLUGIN_PATH} gst-launch-1.0 playbin uri='http://test-media.youview.co.uk/ondemand/bbb/avc3/1/2drm_manifest.mpd'


Without the fix, the pipeline will shutdown with a negotiation error after two fragments.
Comment 3 Sebastian Dröge (slomo) 2016-02-17 15:06:38 UTC
Pushed with a minor change to use gst_structure_has_name(). Thanks!


commit 97f6f7c71348dc49b32183f83c1000379ead2b77
Author: Alex Ashley <bugzilla@ashley-family.net>
Date:   Tue Feb 9 13:17:00 2016 +0000

    qtdemux: only transform protected caps once
    
    Commit 7873bede3134b15e5066e8d14e54d1f5054d2063
    (https://bugzilla.gnome.org/show_bug.cgi?id=760774) changed the
    behaviour of qtdemux to call gst_qtdemux_configure_stream() for
    every new moof.
    
    When playing a protected stream, gst_qtdemux_configure_stream()
    calls gst_qtdemux_configure_protected_caps(). The
    gst_qtdemux_configure_protected_caps() function takes the original
    media format, puts this in a field called "original-media-type"
    and then changes the caps to "application/x-cenc".
    
    The gst_qtdemux_configure_protected_caps() did not handle the case
    of being called multiple times, causing it to incorrectly set the
    caps. The second call was causing the caps to be set to:
    
        application/x-cenc, original-media-type"application/x-cenc"
    
    This commit makes gst_qtdemux_configure_protected_caps() check that
    the caps have already been transformed, so that it only gets
    changed once.
    
        https://bugzilla.gnome.org/show_bug.cgi?id=761769