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 719783 - qtdemux: regression with mp4-main-multi-mpd-AV-NBS.mpd
qtdemux: regression with mp4-main-multi-mpd-AV-NBS.mpd
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other All
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-03 15:47 UTC by Guillaume Desmottes
Modified: 2013-12-04 14:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
qtdemux: improve fragment-start tracking (5.03 KB, patch)
2013-12-03 18:33 UTC, Thiago Sousa Santos
committed Details | Review

Comment 1 Thiago Sousa Santos 2013-12-03 18:33:59 UTC
Created attachment 263422 [details] [review]
qtdemux: improve fragment-start tracking

Some buffers can have multiple moov atoms inside and the strategy
of using the gst_adapter_prev_pts timestamp to get the base timestamp
for the media of the fragment would fail as it would reuse the same
base timestamp for all moofs in the buffer instead of accumulating
the durations for all of them.

Heres a better explanation of the issue:
qtdemux receives a buffer where PTS(buf) = X
buf -> moofA | moofB | moofC

The problem was that PTS(buf) was used as the base timestamp for
all 3 moofs, causing all buffers to be X based. In this case we want
only moofA to be X based as it is what the PTS on buf means, and the
other moofB and moofC just use the accumulated timestamp from the
previous moofs durations.

To solve this, this patch uses gst_adapter_prev_pts distance
result, this allows qtdemux to calculate if it should use the
resulting pts or just accumulate the samples as it can identify
if the moofs belong to the same upstream buffer or not.
Comment 2 Thiago Sousa Santos 2013-12-04 14:12:05 UTC
Pushed as 1fd094d96ba9b77921b087600912475edb31b985
Comment 3 Thiago Sousa Santos 2013-12-04 14:25:44 UTC
Here's the full commit for future reference:

commit 1fd094d96ba9b77921b087600912475edb31b985
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Tue Dec 3 15:08:25 2013 -0300

    qtdemux: improve fragment-start tracking
    
    Some buffers can have multiple moov atoms inside and the strategy
    of using the gst_adapter_prev_pts timestamp to get the base timestamp
    for the media of the fragment would fail as it would reuse the same
    base timestamp for all moofs in the buffer instead of accumulating
    the durations for all of them.
    
    Heres a better explanation of the issue:
    qtdemux receives a buffer where PTS(buf) = X
    buf -> moofA | moofB | moofC
    
    The problem was that PTS(buf) was used as the base timestamp for
    all 3 moofs, causing all buffers to be X based. In this case we want
    only moofA to be X based as it is what the PTS on buf means, and the
    other moofB and moofC just use the accumulated timestamp from the
    previous moofs durations.
    
    To solve this, this patch uses gst_adapter_prev_pts distance
    result, this allows qtdemux to calculate if it should use the
    resulting pts or just accumulate the samples as it can identify
    if the moofs belong to the same upstream buffer or not.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719783