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 625138 - [dshowvideosrc] Don't use a range in the caps if min==max
[dshowvideosrc] Don't use a range in the caps if min==max
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-23 16:46 UTC by Andoni Morales
Modified: 2010-08-14 13:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-dshowvideosrc-Don-t-make-a-range-if-min-max (2.74 KB, patch)
2010-07-23 16:46 UTC, Andoni Morales
none Details | Review
Fix commit author (previous was void) (2.76 KB, patch)
2010-07-23 16:59 UTC, Andoni Morales
none Details | Review
Fix values comparison (replace min=max with min==max) (2.75 KB, patch)
2010-07-23 19:33 UTC, Andoni Morales
committed Details | Review

Description Andoni Morales 2010-07-23 16:46:35 UTC
Created attachment 166460 [details] [review]
0001-dshowvideosrc-Don-t-make-a-range-if-min-max

If we have fixed values, trying to make a range results on a error
and the caps will be missing the fields 'height', 'width' and 'framerate',
which doesn't match the pad template.
Comment 1 Andoni Morales 2010-07-23 16:59:20 UTC
Created attachment 166461 [details] [review]
Fix commit author (previous was void)
Comment 2 Julien Isorce 2010-07-23 18:12:21 UTC
Hi, 

Thx for reporting and the patch.

I have 2 questions:

** If we a fixed width as 10, why having "width=(int)[ 10, 10 ]" results on a error ?
Anyway, having "width=(int)10" would be better.

** You wrote: after executing "if (min_w = max_w)", then min_w will be equal to max_w (and only False if max_w is equal to 0). Is it what you want ? (should be "==" instead of "=" ?

Julien
Comment 3 Andoni Morales 2010-07-23 18:29:49 UTC
(In reply to comment #2)
> Hi, 
> 
> Thx for reporting and the patch.
> 
> I have 2 questions:
> 
> ** If we a fixed width as 10, why having "width=(int)[ 10, 10 ]" results on a
> error ?
> Anyway, having "width=(int)10" would be better.
The start must be smaller than the range stop
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gstvalue.c#n785
> 
> ** You wrote: after executing "if (min_w = max_w)", then min_w will be equal to
> max_w (and only False if max_w is equal to 0). Is it what you want ? (should be
> "==" instead of "=" ?

That's a very stupid typo from my side :)
> 
> Julien
Comment 4 Andoni Morales 2010-07-23 19:33:25 UTC
Created attachment 166466 [details] [review]
Fix values comparison (replace min=max with min==max)
Comment 5 Julien Isorce 2010-07-29 14:11:16 UTC
commit 0390f0d765545dcf4669b1e9592a133b223f6a8a
Author: Andoni Morales <ylatuya@gmail.com>
Date:   Thu Jul 29 16:08:03 2010 +0200

    dshowvideosrc: don't make a range if min==max
    
    Fixes bug #625138