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 731968 - hlsdemux: Fix decrypting fragments
hlsdemux: Fix decrypting fragments
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.3.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-20 14:27 UTC by GstBlub
Modified: 2014-06-22 12:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (1.99 KB, patch)
2014-06-20 14:27 UTC, GstBlub
committed Details | Review

Description GstBlub 2014-06-20 14:27:02 UTC
Created attachment 278838 [details] [review]
Patch

Only reset the decryption engine on the first buffer of a fragment, not again for the second buffer.  This fixes corrupting the second buffer of a fragment.

This happens because demux->starting_fragment is TRUE for the first two buffers of an encrypted fragment.  This is because the first incoming buffer isn't actually processed, but stored away.  Because demux->pending_buffer is NULL the very first time, demux->starting_fragment is still set to TRUE, causing the crypto stuff to be reset again before processing the second buffer.
Comment 1 Sebastian Dröge (slomo) 2014-06-20 21:59:30 UTC
Comment on attachment 278838 [details] [review]
Patch

Looks good, will push it tomorrow :) Thanks for the patch!
Comment 2 Sebastian Dröge (slomo) 2014-06-22 12:15:18 UTC
commit 78bae6c5ffdca54bf6a1a34840d29bfb9f87f82f
Author: Thomas Bluemel <tbluemel@control4.com>
Date:   Fri Jun 20 08:20:55 2014 -0600

    hlsdemux: Fix decrypting fragments
    
    Only reset the decryption engine on the first buffer of a fragment,
    not again for the second buffer.  This fixes corrupting the second
    buffer of a fragment.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731968