List Info

Thread: sebastien gst-plugins-good: gst-plugins-good/ gst-plugins-good/gst/matroska/ gst-plugins-good/win32/




sebastien gst-plugins-good: gst-plugins-good/ gst-plugins-good/gst/matroska/ gst-plugins-good/win32/
user name
2006-04-22 19:33:27
On Sat, 2006-04-22 at 15:33 +0000, Sebastien Moutte wrote:

> CVS Root:       /cvs/gstreamer
> Module:         gst-plugins-good
> Changes by:     sebastien
> Date:           Sat Apr 22 2006  15:33:00 UTC
> 
> Log message:
> * gst/matroska/matroska-demux.c:
(gst_matroskademux_do_index_seek):
> Use gst_guint64_to_gdouble for conversions
>   ... 
> diff -u -d -r1.74 -r1.75
> --- matroska-demux.c	20 Apr 2006 13:23:40 -0000	1.74
> +++ matroska-demux.c	22 Apr 2006 15:32:47 -0000	1.75
>  -1043,8 +1043,9 
>      for (n = 0; n < demux->num_indexes; ++n) {
>        gdouble d_entry, d_this;
> -      d_entry = fabs ((gdouble)
demux->index[entry].time - (gdouble) seek_pos);
> -      d_this = fabs ((gdouble) demux->index[n].time
- (gdouble) seek_pos);
> +      d_entry =
> +          fabs (gst_guint64_to_gdouble
(demux->index[entry].time - seek_pos));
> +      d_this = fabs (gst_guint64_to_gdouble
(demux->index[n].time - seek_pos));
>        if (d_this < d_entry &&
>            (demux->index[n].time < segment_stop
|| segment_stop == -1)) {

If I'm not mistaken, this change will lead to completely
wrong results,
as negative entry.time - seek_pos differences will be
interpreted as
unsigned by gst_guint64_to_gdouble() and thus converted to
very large
double values rather than negative double values.

Please revert or fix.

Cheers
 -Tim




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
sebastien gst-plugins-good: gst-plugins-good/ gst-plugins-good/gst/matroska/ gst-plugins-good/win32/
user name
2006-04-23 16:05:36
My bad.
I've just fixed it with
      d_entry = fabs (gst_guint64_to_gdouble
(demux->index[entry].time) -
        gst_guint64_to_gdouble (seek_pos));
      d_this = fabs (gst_guint64_to_gdouble
(demux->index[n].time) -
        gst_guint64_to_gdouble (seek_pos));
Regards,
Sebastien

Tim Müller a écrit :
> On Sat, 2006-04-22 at 15:33 +0000, Sebastien Moutte
wrote:
>
>   
>> CVS Root:       /cvs/gstreamer
>> Module:         gst-plugins-good
>> Changes by:     sebastien
>> Date:           Sat Apr 22 2006  15:33:00 UTC
>>
>> Log message:
>> * gst/matroska/matroska-demux.c:
(gst_matroskademux_do_index_seek):
>> Use gst_guint64_to_gdouble for conversions
>>   ... 
>> diff -u -d -r1.74 -r1.75
>> --- matroska-demux.c	20 Apr 2006 13:23:40
-0000	1.74
>> +++ matroska-demux.c	22 Apr 2006 15:32:47
-0000	1.75
>>  -1043,8 +1043,9 
>>      for (n = 0; n < demux->num_indexes; ++n)
{
>>        gdouble d_entry, d_this;
>> -      d_entry = fabs ((gdouble)
demux->index[entry].time - (gdouble) seek_pos);
>> -      d_this = fabs ((gdouble)
demux->index[n].time - (gdouble) seek_pos);
>> +      d_entry =
>> +          fabs (gst_guint64_to_gdouble
(demux->index[entry].time - seek_pos));
>> +      d_this = fabs (gst_guint64_to_gdouble
(demux->index[n].time - seek_pos));
>>        if (d_this < d_entry &&
>>            (demux->index[n].time <
segment_stop || segment_stop == -1)) {
>>     
>
> If I'm not mistaken, this change will lead to
completely wrong results,
> as negative entry.time - seek_pos differences will be
interpreted as
> unsigned by gst_guint64_to_gdouble() and thus converted
to very large
> double values rather than negative double values.
>
> Please revert or fix.
>
> Cheers
>  -Tim
>
>
>
>
>   


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http:
//sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&
amp;3057&dat1642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )