# HG changeset patch # User nenolod # Date 1170023837 28800 # Node ID 324a6d834f32882a7706da3b0048662534a73df0 # Parent 732f07a601bc36c89e48ebe9cf2a673365d71038 [svn] - fix vorbis fileinfo stuff diff -r 732f07a601bc -r 324a6d834f32 ChangeLog --- a/ChangeLog Sun Jan 28 03:51:32 2007 -0800 +++ b/ChangeLog Sun Jan 28 14:37:17 2007 -0800 @@ -1,3 +1,10 @@ +2007-01-28 11:51:32 +0000 Tony Vroon + revision [1200] + Count leading zeroes as PPC assembler. Implemented by Joseph Jezak (JoseJX) from Gentoo. + trunk/src/alac/alac.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + + 2007-01-28 10:32:41 +0000 William Pitcock revision [1198] - User-Agent: Audacious/$version (curl transport) diff -r 732f07a601bc -r 324a6d834f32 src/vorbis/fileinfo.c --- a/src/vorbis/fileinfo.c Sun Jan 28 03:51:32 2007 -0800 +++ b/src/vorbis/fileinfo.c Sun Jan 28 14:37:17 2007 -0800 @@ -498,7 +498,7 @@ vorbis_info *vi; vorbis_comment *comment = NULL; - VFSFile *fh; + VFSVorbisFile *fh = g_new0(VFSVorbisFile, 1); gboolean clear_vf = FALSE; @@ -925,7 +925,7 @@ gtk_label_set_text(GTK_LABEL(filesize_label), _("File size:")); gtk_label_set_text(GTK_LABEL(filesize_label_val), _("N/A")); - if ((fh = vfs_fopen(vte.filename, "r")) != NULL) { + if ((fh->fd = vfs_fopen(vte.filename, "r")) != NULL) { g_mutex_lock(vf_mutex); if (ov_open_callbacks(fh, &vf, NULL, 0, vorbis_callbacks) == 0) { @@ -949,8 +949,8 @@ time = ov_time_total(&vf, -1); minutes = time / 60; seconds = time % 60; - vfs_fseek(fh, 0, SEEK_END); - filesize = vfs_ftell(fh); + vfs_fseek(fh->fd, 0, SEEK_END); + filesize = vfs_ftell(fh->fd); label_set_text(GTK_LABEL(bitrate_label_val), _("%d KBit/s (nominal)"), bitrate); @@ -963,7 +963,7 @@ } else - vfs_fclose(fh); + vfs_fclose(fh->fd); } rg_track_gain = get_comment(comment, "replaygain_track_gain"); @@ -1065,4 +1065,6 @@ gtk_widget_set_sensitive(save_button, FALSE); gtk_widget_set_sensitive(remove_button, FALSE); + + g_free(fh); } diff -r 732f07a601bc -r 324a6d834f32 src/vorbis/vorbis.c --- a/src/vorbis/vorbis.c Sun Jan 28 03:51:32 2007 -0800 +++ b/src/vorbis/vorbis.c Sun Jan 28 14:37:17 2007 -0800 @@ -91,11 +91,6 @@ ovcb_tell }; -typedef struct { - VFSFile *fd; - gboolean probe; -} VFSVorbisFile; - gchar *vorbis_fmts[] = { "ogg", "ogm", NULL }; InputPlugin vorbis_ip = { diff -r 732f07a601bc -r 324a6d834f32 src/vorbis/vorbis.h --- a/src/vorbis/vorbis.h Sun Jan 28 03:51:32 2007 -0800 +++ b/src/vorbis/vorbis.h Sun Jan 28 14:37:17 2007 -0800 @@ -5,6 +5,11 @@ #include "audacious/vfs.h" +typedef struct { + VFSFile *fd; + gboolean probe; +} VFSVorbisFile; + extern ov_callbacks vorbis_callbacks; void vorbis_configure(void);