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 691570 - [isomp4/qtdemux] lots of critical warnings on this sample file
[isomp4/qtdemux] lots of critical warnings on this sample file
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.x
Other All
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-11 17:37 UTC by Arnaud Vrac
Modified: 2013-11-29 20:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
qtdemux: do not free streams if they were not created locally (2.61 KB, patch)
2013-11-15 13:05 UTC, Thiago Sousa Santos
committed Details | Review
qtdemux: avoid re-reading the same moov and entering into loop (4.07 KB, patch)
2013-11-15 13:05 UTC, Thiago Sousa Santos
committed Details | Review

Description Arnaud Vrac 2013-01-11 17:37:54 UTC
The following pipeline outputs a lot of critical warnings:

gst-launch souphttpsrc location=http://absolut.zogzog.org/share/samples/mov/IMG_0356.MOV ! qtdemux ! fakesink

qtdemux incorrectly detects new tracks after some time and tries to create pads for them.
Comment 1 Mark Nauwelaerts 2013-01-27 14:02:27 UTC
Looks like this is a sort-of fragmented file, but with mdat moov order which tries to read/parse moov a second time.  Following commit should avoid that:

[git]
commit a1a579afebca2e82715e9e57a91e591bb3a0802f
Author: Mark Nauwelaerts <mnauw@users.sourceforge.net>
Date:   Sun Jan 27 12:54:15 2013 +0100

    qtdemux: push mode: only parse moov 1 once
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691570

[1.0]
commit ada46299f1cd9e6a6337be84bb356062a99514f0
Author: Mark Nauwelaerts <mnauw@users.sourceforge.net>
Date:   Sun Jan 27 12:54:15 2013 +0100

    qtdemux: push mode: only parse moov 1 once
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691570

[0.10]
commit 87e21e1c7a65f5347b84b7f77ae11e01dc64d0c2
Author: Mark Nauwelaerts <mnauw@users.sourceforge.net>
Date:   Sun Jan 27 15:00:36 2013 +0100

    qtdemux: push mode: only parse moov 1 once
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691570
    
    Conflicts:
    
        gst/isomp4/qtdemux.c
Comment 2 Arnaud Vrac 2013-11-12 17:07:12 UTC
This file is now crashing again with gstreamer 1.2
Comment 3 Thiago Sousa Santos 2013-11-12 18:09:47 UTC
How exactly?

I've run 1.2.1 and master and couldn't reproduce a crash. The video is upside-down, though (in all of them).
Comment 4 Arnaud Vrac 2013-11-13 11:05:53 UTC
The video being upside down is normal, there's a matrix in the trak atom for the video that needs to be applied to get the proper rotation. I have a custom element for this, however this is not the issue here.

Have you tried running the pipeline in the first comment ? I get a SEGV after the following warnings are printed:

ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: This file is corrupt and cannot be played.

(gst-launch-1.0:24245): GStreamer-CRITICAL **: gst_pad_set_event_function_full: assertion 'GST_IS_PAD (pad)' failed
Additional debug info:
qtdemux.c(6640): qtdemux_parse_samples (): /GstPipeline:pipeline0/GstQTDemux:qtdemux0

(gst-launch-1.0:24245): GStreamer-CRITICAL **: gst_pad_set_query_function_full: assertion 'GST_IS_PAD (pad)' failed
Execution ended after 0:00:01.636990464

(gst-launch-1.0:24245): GStreamer-CRITICAL **: gst_pad_set_active: assertion 'GST_IS_PAD (pad)' failed
Setting pipeline to PAUSED ...

** (gst-launch-1.0:24245): CRITICAL **: gst_pad_set_caps: assertion 'GST_IS_PAD (pad)' failed
Setting pipeline to READY ...

Program received signal SIGSEGV, Segmentation fault.
Comment 5 Thiago Sousa Santos 2013-11-15 04:30:05 UTC
Yes, could reproduce it. Working on another fix.
Comment 6 Thiago Sousa Santos 2013-11-15 13:05:50 UTC
Created attachment 259871 [details] [review]
qtdemux: do not free streams if they were not created locally

When parsing a trak only free streams on failures if those streams
were created locally. They could have been created from a previous
fragment, in this case we they have valid info from the other fragment.
Including pads.
Comment 7 Thiago Sousa Santos 2013-11-15 13:05:55 UTC
Created attachment 259872 [details] [review]
qtdemux: avoid re-reading the same moov and entering into loop

In the scenario of "mdat | moov (with fragmented artifacts)" qtdemux
could read the moov again after the mdat because it was considering the
media as a fragmented one.

To avoid this loop this patch makes it store
the last processed moov_offset to avoid parsing it again.
And it also checks if there are any samples to play before
resturning to the mdat, so that it knows there is new data to be played.
Comment 8 Thiago Sousa Santos 2013-11-29 20:49:18 UTC
commit 45c16599ff4a3d674bd651cdb3babbc00af8d06c
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Fri Nov 15 08:54:07 2013 -0300

    qtdemux: avoid re-reading the same moov and entering into loop
    
    In the scenario of "mdat | moov (with fragmented artifacts)" qtdemux
    could read the moov again after the mdat because it was considering the
    media as a fragmented one.
    
    To avoid this loop this patch makes it store
    the last processed moov_offset to avoid parsing it again.
    And it also checks if there are any samples to play before
    resturning to the mdat, so that it knows there is new data to be played.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691570

commit fcc78aa3bdff35574425e2953e8bd119279d6354
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Fri Nov 15 00:52:53 2013 -0300

    qtdemux: do not free streams if they were not created locally
    
    When parsing a trak only free streams on failures if those streams
    were created locally. They could have been created from a previous
    fragment, in this case we they have valid info from the other fragment.
    Including pads.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691570