Revision: 1813
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1813&view=rev
Author: jcsjcs
Date: 2007-12-11 04:34:20 -0800 (Tue, 11 Dec 2007)
Log Message:
-----------
* src/mp3file.c(get_mp3_info): fix integer overlow in
calculation of track length of very long tracks. Thanks to
Dylan Hall.
* src/file_convert.c(conversion_scheduler_unlocked,
transfer_get_failed_tracks): attempt to fix the problem of
non-transfered tracks. Unable to reproduce the problem
myself so I have no way to say whether this is a fix or not.
Modified Paths:
--------------
gtkpod/trunk/ChangeLog_detailed
gtkpod/trunk/src/file_convert.c
gtkpod/trunk/src/mp3file.c
Modified: gtkpod/trunk/ChangeLog_detailed
===================================================================
--- gtkpod/trunk/ChangeLog_detailed 2007-12-11 12:07:35 UTC (rev 1812)
+++ gtkpod/trunk/ChangeLog_detailed 2007-12-11 12:34:20 UTC (rev 1813)
@@ -1,3 +1,14 @@
+2007-12-11 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+ * src/mp3file.c(get_mp3_info): fix integer overlow in
+ calculation of track length of very long tracks. Thanks to
+ Dylan Hall.
+
+ * src/file_convert.c(conversion_scheduler_unlocked,
+ transfer_get_failed_tracks): attempt to fix the problem of
+ non-transfered tracks. Unable to reproduce the problem
+ myself so I have no way to say whether this is a fix or not.
+
2007-12-11 Todd Zullinger <tmzullinger at users.sourceforge.net>
* data/gtkpod.glade:
Modified: gtkpod/trunk/src/file_convert.c
===================================================================
--- gtkpod/trunk/src/file_convert.c 2007-12-11 12:07:35 UTC (rev 1812)
+++ gtkpod/trunk/src/file_convert.c 2007-12-11 12:34:20 UTC (rev 1813)
@@ -1675,6 +1675,8 @@
g_free (ctr->errormessage);
ctr->errormessage = NULL;
}
+ g_free (ctr->dest_filename);
+ ctr->dest_filename = NULL;
tri->finished = g_list_prepend (tri->finished, ctr);
}
else
@@ -2699,11 +2701,8 @@
tri = transfer_get_tri (conv, itdb);
g_return_val_if_fail (tri, (g_mutex_unlock (conv->mutex), NULL));
- if (conv->failed || tri->failed)
- { /* move the tracks over to tri->finished by calling the
- scheduler directly */
- conversion_scheduler_unlocked (conv);
- }
+ /* Make sure all failed tracks are forwarded to tri->finished */
+ conversion_scheduler_unlocked (conv);
for (gl=tri->finished; gl; gl=gl->next)
{
Modified: gtkpod/trunk/src/mp3file.c
===================================================================
--- gtkpod/trunk/src/mp3file.c 2007-12-11 12:07:35 UTC (rev 1812)
+++ gtkpod/trunk/src/mp3file.c 2007-12-11 12:34:20 UTC (rev 1813)
@@ -1,4 +1,4 @@
-/* Time-stamp: <2007-07-14 15:47:57 jcs>
+/* Time-stamp: <2007-12-11 21:31:57 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -418,7 +418,7 @@
void get_mp3_info(MP3Info *mp3)
{
gint frame_type[15]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
- float milliseconds=0,total_rate=0;
+ double milliseconds=0,total_rate=0;
gint frames=0,frame_types=0,frames_so_far=0;
gint vbr_median=-1;
guint bitrate;
@@ -447,7 +447,7 @@
frames_so_far += frame_type[counter];
header_bitrate = mp3file_header_bitrate(&header);
if (header_bitrate != 0)
- milliseconds +=
(float)(8*frame_length(&header)*frame_type[counter])/header_bitrate;
+ milliseconds +=
8*(double)frame_length(&header)*(double)frame_type[counter]/header_bitrate;
total_rate += header_bitrate*frame_type[counter];
if((vbr_median == -1) && (frames_so_far >= frames/2))
vbr_median=counter;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2