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 735581 - imagefreeze: Remove impossible error condition
imagefreeze: Remove impossible error condition
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal trivial
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-28 10:05 UTC by Vineeth
Modified: 2014-08-28 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Attaching proposed patch (1.04 KB, patch)
2014-08-28 10:06 UTC, Vineeth
needs-work Details | Review
Updated the commit message and removed '(', ')' (1.17 KB, patch)
2014-08-28 10:47 UTC, Vineeth
committed Details | Review

Description Vineeth 2014-08-28 10:05:36 UTC
Removing unreachable code in the function
gst_image_freeze_sink_chain()

once EOS is passed, the GstPad rejects the next request and if(self->buffer) will never be satisfied.
Replacing it by returning error, incase GstPad does not reject the request
Comment 1 Vineeth 2014-08-28 10:06:01 UTC
Created attachment 284669 [details] [review]
Attaching proposed patch
Comment 2 Sebastian Dröge (slomo) 2014-08-28 10:22:59 UTC
Review of attachment 284669 [details] [review]:

Please write the commit messages in the style the others are:

elementname: Short description

long description
over multiple
lines

https://bugzilla.gnome.org/1234567

::: gst/imagefreeze/gstimagefreeze.c
@@ +670,3 @@
   GstImageFreeze *self = GST_IMAGE_FREEZE (parent);
 
+  g_return_val_if_fail ((self->buffer == NULL), GST_FLOW_ERROR);

The () around the condition are not needed
Comment 3 Vineeth 2014-08-28 10:47:45 UTC
Created attachment 284678 [details] [review]
Updated the commit message and removed '(', ')'

Thanks for the review

Have updated the commit message.
Comment 4 Sebastian Dröge (slomo) 2014-08-28 11:56:02 UTC
commit d46631c5c7312ad613397f8238c7a9714ae3ae94
Author: Vineeth T M <vineeth.tm@samsung.com>
Date:   Thu Aug 28 16:13:29 2014 +0530

    imagefreeze: Remove impossible error condition
    
    We return EOS after the first buffer, and GstPad will make sure now that we
    won't get any other buffer afterwards until a flush happens. No need to check
    for it ourselves.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735581