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 728435 - vtdec: fails to decode randomly
vtdec: fails to decode randomly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal blocker
: 1.3.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-17 16:26 UTC by Andoni Morales
Modified: 2014-07-04 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vtdec: ignore the dropped flag if buffer was received (1.51 KB, patch)
2014-07-02 03:56 UTC, Thiago Sousa Santos
committed Details | Review
vtdec: avoid segfault when output isn't configured (1.11 KB, patch)
2014-07-02 03:56 UTC, Thiago Sousa Santos
accepted-commit_now Details | Review
vtdec: avoid segfault when output isn't configured (1.67 KB, patch)
2014-07-02 08:44 UTC, Thiago Sousa Santos
committed Details | Review

Description Andoni Morales 2014-04-17 16:26:02 UTC
vtdec fails to decode randomly with the following error messages:

0:00:00.859137000 51078    0x1005bde30 WARN                   vtdec vtdec.c:544:gst_vtdec_session_output_callback:<vtdec0> Frame dropped 0x1008abea0 0
0:00:05.848712000 51078    0x1010b1850 ERROR                  vtdec vtdec.c:519:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame 268451843
0:00:05.849020000 51078    0x1010b1850 WARN                   vtdec vtdec.c:544:gst_vtdec_session_output_callback:<vtdec0> Frame dropped 0x101126000 1
0:00:05.860912000 51078    0x1005bde30 WARN                   vtdec vtdec.c:544:gst_vtdec_session_output_callback:<vtdec0> Frame dropped 0x101126110 2
0:00:10.858018000 51078    0x1010b1850 ERROR                  vtdec vtdec.c:519:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame 268451843
0:00:10.858363000 51078    0x1010b1850 WARN                   vtdec vtdec.c:544:gst_vtdec_session_output_callback:<vtdec0> Frame dropped 0x101126000 3
0:00:10.866109000 51078    0x1005bde30 WARN                   vtdec vtdec.c:544:gst_vtdec_session_output_callback:<vtdec0> Frame dropped 0x1011140a0 4
0:00:15.863930000 51078    0x1010b1850 ERROR                  vtdec vtdec.c:519:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame 268451843
0:00:15.863967000 51078    0x1010b1850 WARN                   vtdec vtdec.c:544:gst_vtdec_session_output_callback:<vtdec0> Frame dropped 0x101126000 5
0:00:15.874228000 51078    0x1005bde30 WARN                   vtdec vtdec.c:544:gst_vtdec_session_output_callback:<vtdec0> Frame dropped 0x101114810 6
0:00:20.878758000 51078    0x1010b1850 ERROR                  vtdec vtdec.c:519:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame 268451843
0:00:20.879096000 51078    0x1010b1850 WARN                   vtdec vtdec.c:544:gst_vtdec_session_output_callback:<vtdec0> Frame dropped 0x101126000 7
0:00:20.931725000 51078    0x1005bde30 WARN                   vtdec vtdec.c:544:gst_vtdec_session_output_callback:<vtdec0> Frame dropped 0x101114e70 8


It can be reproduced with:

GST_DEBUG=*vtdec*:5 gst-launch-1.0 playbin uri=file:///Users/fluendo/Downloads/big_buck_bunny_480p_h264.mov
Comment 1 Sebastian Dröge (slomo) 2014-06-23 18:47:20 UTC
Why is this a blocker?
Comment 2 Andoni Morales 2014-06-23 23:37:48 UTC
It's a regression similar to #727757
vtdec is now chosen by playbin and this pipeline that was working in 1.2 does not work anymore:
 gst-launch-1.0 playbin uri=http://mirror.bigbuckbunny.de/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov
Comment 3 Sebastian Dröge (slomo) 2014-06-24 06:48:46 UTC
Right, if nobody is going to fix that before 1.4.0 we will lower the rank of the element to NONE or MARGINAL again (something lower than gst-libav).
Comment 4 Sebastian Dröge (slomo) 2014-06-28 14:35:01 UTC
Andoni, are you working on this or should we lower the rank?
Comment 5 Thiago Sousa Santos 2014-07-01 20:50:06 UTC
Is there a particular way of reproducing this? Played this same file a few times and it only happened once. Now I can't reproduce it anymore.

Any particular sink being used?
Comment 6 Andoni Morales 2014-07-01 21:14:54 UTC
I haven't found a way to reproduce it, it's completely random but I think it's easier to reproduce playing this file locally instead of through http
Comment 7 Thiago Sousa Santos 2014-07-02 03:56:27 UTC
Created attachment 279732 [details] [review]
vtdec: ignore the dropped flag if buffer was received

Apparently there is some issue with VT that makes it mark the dropped
flag even though the buffer was decoded.
Comment 8 Thiago Sousa Santos 2014-07-02 03:56:32 UTC
Created attachment 279733 [details] [review]
vtdec: avoid segfault when output isn't configured

This can help when the callback is called during/after videodecoder base class
shut down
Comment 9 Thiago Sousa Santos 2014-07-02 08:44:49 UTC
Created attachment 279737 [details] [review]
vtdec: avoid segfault when output isn't configured

Updated patch to avoid an assertion or segfault as the invalidation of the
VT context seems to make the CFBufferRelease segfault or, when it succeeds,
makes the base videodecoder class assert on a segment.format issue
Comment 10 Thiago Sousa Santos 2014-07-02 09:24:56 UTC
commit 92dbcf2bf9787460d9013e8e89b4bee16388c05f
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Wed Jul 2 04:54:29 2014 -0300

    vtdec: avoid segfault when output isn't configured
    
    This can help when the callback is called during/after videodecoder
    base class shut down
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728435

commit f75f860ff3791f47db3eb52602f0c5e6b9f35748
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Wed Jul 2 00:27:12 2014 -0300

    vtdec: ignore the dropped flag if buffer was received
    
    Apparently there is some issue with VT that makes it mark the dropped
    flag even though the buffer was decoded.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728435