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 715166 - pngparse: Don't set a framerate from uninitialized variables
pngparse: Don't set a framerate from uninitialized variables
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.2.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-25 15:03 UTC by Lubosz Sarnecki
Modified: 2013-12-12 23:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Minimal test that causes the error sometimes (2.75 KB, text/x-csrc)
2013-11-25 15:03 UTC, Lubosz Sarnecki
  Details
Graph of the pipeline before the main loop is run (320.44 KB, image/png)
2013-11-25 15:04 UTC, Lubosz Sarnecki
  Details
Graph of the pipeline when the error occurs (327.16 KB, image/png)
2013-11-25 15:04 UTC, Lubosz Sarnecki
  Details
Graph of the pipeline at EOS when it was successful (627.59 KB, image/png)
2013-11-25 15:05 UTC, Lubosz Sarnecki
  Details
Patch on bad plugins that fixes the issue (1.75 KB, patch)
2013-11-25 16:57 UTC, Lubosz Sarnecki
committed Details | Review

Description Lubosz Sarnecki 2013-11-25 15:03:44 UTC
Created attachment 261446 [details]
Minimal test that causes the error sometimes

pngparse causes following error in 1/3 cases

ERROR from element pngparse1: GStreamer encountered a general stream error.
Debugging info: gstbaseparse.c(3188): gst_base_parse_loop (): /GESPipeline:gespipeline0/GESTimeline:gestimeline0/GESVideoTrack:gesvideotrack0/GnlComposition:gnlcomposition0/GnlSource:gnlsource0/GstBin:videosrcbin/GstBin:still-image-bin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin3/GstPngParse:pngparse1:
streaming stopped, reason not-linked

Using GStreamer 1.2.1, gnonlin, gst-editing-services from git
Comment 1 Lubosz Sarnecki 2013-11-25 15:04:30 UTC
Created attachment 261447 [details]
Graph of the pipeline before the main loop is run
Comment 2 Lubosz Sarnecki 2013-11-25 15:04:59 UTC
Created attachment 261448 [details]
Graph of the pipeline when the error occurs
Comment 3 Lubosz Sarnecki 2013-11-25 15:05:36 UTC
Created attachment 261449 [details]
Graph of the pipeline at EOS when it was successful
Comment 4 Lubosz Sarnecki 2013-11-25 15:17:25 UTC
The error may occur because GstDecodeBin sets a negative framerate. The framerate is only negative when it fails. Otherwise its also bogus, but it works. Setting framerate with restriction caps does not work, because its only on the track.
Comment 5 Sebastian Dröge (slomo) 2013-11-25 15:37:04 UTC
A negative framerate should never happen at all, please try to find the element that sets it first and then let's fix that one :)
Comment 6 Lubosz Sarnecki 2013-11-25 15:55:04 UTC
$ gst-discoverer-1.0 -v data/image/vieh.png | grep framerate
  video(image): image/png, width=(int)512, height=(int)512, framerate=(fraction)-509212673/5
      image/png, width=(int)512, height=(int)512, framerate=(fraction)-509212673/5
$ gst-discoverer-1.0 -v data/image/vieh.png | grep framerate
  video(image): image/png, width=(int)512, height=(int)512, framerate=(fraction)-206556775/3
      image/png, width=(int)512, height=(int)512, framerate=(fraction)-206556775/3
$ gst-discoverer-1.0 -v data/image/vieh.png | grep framerate
  video(image): image/png, width=(int)512, height=(int)512, framerate=(fraction)24356861/15
      image/png, width=(int)512, height=(int)512, framerate=(fraction)24356861/15
$ gst-discoverer-1.0 -v data/image/vieh.png | grep framerate
  video(image): image/png, width=(int)512, height=(int)512, framerate=(fraction)-2001127427/15
      image/png, width=(int)512, height=(int)512, framerate=(fraction)-2001127427/15

the framerate is negative sometimes. this is when the problem occurs.
Comment 7 Sebastian Dröge (slomo) 2013-11-25 15:57:52 UTC
Is this really a different, negative framerate on the *same* file? :) Could you attach that file here, and/or try to find who randomly miscalculates the framerate?
Comment 8 Lubosz Sarnecki 2013-11-25 16:56:29 UTC
this is caused by following patch:

commit da506f4a0a86cf2a7b35233289e670710b00adcb
Author: Thibault Saunier <thibault.saunier@collabora.com>
Date:   Wed Nov 13 17:16:04 2013 -0300

    pngparse: Proxy upstream framerate on srcpad if avalaible
    
    If the user sets it himself with capsfilter, the information should be
    kept and transmitted downstream.
Comment 9 Lubosz Sarnecki 2013-11-25 16:57:56 UTC
Created attachment 261467 [details] [review]
Patch on bad plugins that fixes the issue

This patch fixes the error. It was caused by uninitialized ints.
sink_caps was returning NULL, but the code did not mind.

I am setting a default 1/1 framerate now.
Comment 10 Lubosz Sarnecki 2013-11-25 17:07:53 UTC
Shouldn't a png have the same framerate everytime?
Comment 11 Olivier Crête 2013-11-28 22:56:32 UTC
png don't have a framerate, so I modified your patch a little to not set the framerate if upstream doesn't provide one.

commit ef9d363dfefc9d7bd343cd2b2562104116b5b14d
Author: Lubosz Sarnecki <lubosz@gmail.com>
Date:   Mon Nov 25 16:57:00 2013 +0000

    pngparse: Don't try to set framerate if not from upstream
    
    https://bugzilla.gnome.org/show_bug.cgi?id=715166
Comment 12 Sebastian Dröge (slomo) 2013-11-29 11:37:24 UTC
Please reassign and retitle bugs properly when closing them
Comment 13 Tim-Philipp Müller 2013-12-12 23:42:04 UTC
Picked into 1.2 since the above commit that broke things is also in 1.2