mirror of
https://code.videolan.org/videolan/vlc
synced 2024-07-21 07:24:15 +02:00
* src/misc/modules.c, modules/gui/wxwindows/timer.cpp: fixed 2 nasty bugs.
* modules/demux/util/id3tag.c: small cleanup.
This commit is contained in:
parent
6ccfada5ee
commit
79e27cb319
@ -2,7 +2,7 @@
|
||||
* id3tag.c: id3 tag parser/skipper based on libid3tag
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2001 VideoLAN
|
||||
* $Id: id3tag.c,v 1.8 2003/06/15 15:16:14 sigmunau Exp $
|
||||
* $Id: id3tag.c,v 1.9 2003/06/23 16:09:13 gbazin Exp $
|
||||
*
|
||||
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
|
||||
*
|
||||
@ -109,7 +109,6 @@ static int ParseID3Tags( vlc_object_t *p_this )
|
||||
u8 *p_peek;
|
||||
int i_size;
|
||||
int i_size2;
|
||||
stream_position_t * p_pos;
|
||||
|
||||
if ( p_this->i_object_type != VLC_OBJECT_INPUT )
|
||||
{
|
||||
@ -122,17 +121,14 @@ static int ParseID3Tags( vlc_object_t *p_this )
|
||||
if ( p_input->stream.b_seekable &&
|
||||
p_input->stream.i_method != INPUT_METHOD_NETWORK )
|
||||
{
|
||||
stream_position_t pos;
|
||||
|
||||
/*look for a id3v1 tag at the end of the file*/
|
||||
p_pos = malloc( sizeof( stream_position_t ) );
|
||||
if ( p_pos == 0 )
|
||||
{
|
||||
msg_Err( p_input, "no mem" );
|
||||
}
|
||||
input_Tell( p_input, p_pos );
|
||||
if ( p_pos->i_size >128 )
|
||||
input_Tell( p_input, &pos );
|
||||
if ( pos.i_size >128 )
|
||||
{
|
||||
input_AccessReinit( p_input );
|
||||
p_input->pf_seek( p_input, p_pos->i_size - 128 );
|
||||
p_input->pf_seek( p_input, pos.i_size - 128 );
|
||||
|
||||
/* get 10 byte id3 header */
|
||||
if( input_Peek( p_input, &p_peek, 10 ) < 10 )
|
||||
@ -160,10 +156,10 @@ static int ParseID3Tags( vlc_object_t *p_this )
|
||||
return( VLC_EGENERIC );
|
||||
}
|
||||
i_size2 = id3_tag_query( p_peek + 118, 10 );
|
||||
if ( i_size2 < 0 && p_pos->i_size > -i_size2 )
|
||||
{ /* id3v2.4 footer found */
|
||||
if ( i_size2 < 0 && pos.i_size > -i_size2 )
|
||||
{ /* id3v2.4 footer found */
|
||||
input_AccessReinit( p_input );
|
||||
p_input->pf_seek( p_input, p_pos->i_size + i_size2 );
|
||||
p_input->pf_seek( p_input, pos.i_size + i_size2 );
|
||||
/* peek the entire tag */
|
||||
if ( input_Peek( p_input, &p_peek, i_size2 ) < i_size2 )
|
||||
{
|
||||
@ -173,7 +169,6 @@ static int ParseID3Tags( vlc_object_t *p_this )
|
||||
ParseID3Tag( p_input, p_peek, i_size2 );
|
||||
}
|
||||
}
|
||||
free( p_pos );
|
||||
input_AccessReinit( p_input );
|
||||
p_input->pf_seek( p_input, 0 );
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* timer.cpp : wxWindows plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2001 VideoLAN
|
||||
* $Id: timer.cpp,v 1.24 2003/06/13 15:54:42 gbazin Exp $
|
||||
* $Id: timer.cpp,v 1.25 2003/06/23 16:09:13 gbazin Exp $
|
||||
*
|
||||
* Authors: Gildas Bazin <gbazin@netcourrier.com>
|
||||
*
|
||||
@ -154,11 +154,9 @@ void Timer::Notify()
|
||||
wxString::Format((wxString)wxU(_("Volume")) + wxT(" %d"),
|
||||
i_volume * 200 / AOUT_VOLUME_MAX ) );
|
||||
|
||||
/* control buttons for free pace streams */
|
||||
b_pace_control = p_intf->p_sys->p_input->stream.b_pace_control;
|
||||
}
|
||||
|
||||
/* control buttons for free pace streams */
|
||||
b_pace_control = p_intf->p_sys->p_input->stream.b_pace_control;
|
||||
|
||||
}
|
||||
else if( p_intf->p_sys->p_input->b_dead )
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
* modules.c : Builtin and plugin modules management functions
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2001 VideoLAN
|
||||
* $Id: modules.c,v 1.120 2003/05/20 16:20:33 zorglub Exp $
|
||||
* $Id: modules.c,v 1.121 2003/06/23 16:09:13 gbazin Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
|
||||
@ -650,7 +650,8 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
|
||||
}
|
||||
|
||||
/* Free plugin-path */
|
||||
free( path[ sizeof(path)/sizeof(char*) - 2 ] );
|
||||
if( path[ sizeof(path)/sizeof(char*) - 2 ] )
|
||||
free( path[ sizeof(path)/sizeof(char*) - 2 ] );
|
||||
path[ sizeof(path)/sizeof(char*) - 2 ] = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user