* modules/demux/mp4/libmp4.c: fixed parsing of the "wave" tag (I'm sure there's a better fix but this one works).
* modules/demux/ogg.c: another seeking fix (We also need to flush the per stream buffer with ogg_stream_reset()).
* postprocess.c: video postprocessing using the ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: postprocess.c,v 1.5 2003/11/24 00:01:42 gbazin Exp $
+ * $Id: postprocess.c,v 1.6 2003/11/26 08:18:09 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
{
var_Create( p_dec, "ffmpeg-pp-q",
VLC_VAR_INTEGER | VLC_VAR_HASCHOICE | VLC_VAR_DOINHERIT );
- text.psz_string = _("Post-Processing");
+ text.psz_string = _("Post processing");
var_Change( p_dec, "ffmpeg-pp-q", VLC_VAR_SETTEXT, &text, NULL );
var_Get( p_dec, "ffmpeg-pp-q", &val_orig );
}
var_DelCallback( p_dec, "ffmpeg-pp-q", PPQCallback, p_sys );
+
+ if( p_sys ) free( p_sys );
}
/*****************************************************************************
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: avi.c,v 1.76 2003/11/24 13:40:03 gbazin Exp $
+ * $Id: avi.c,v 1.77 2003/11/26 08:18:09 gbazin Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
fmt.i_bitrate = p_auds->p_wf->nAvgBytesPerSec*8;
fmt.audio.i_blockalign = p_auds->p_wf->nBlockAlign;
fmt.audio.i_bitspersample = p_auds->p_wf->wBitsPerSample;
- if( ( fmt.i_extra = __MIN( p_auds->p_wf->cbSize,
- p_auds->i_chunk_size - sizeof(WAVEFORMATEX) ) ) > 0 )
- {
- fmt.p_extra = malloc( fmt.i_extra );
- memcpy( fmt.p_extra, &p_auds->p_wf[1], fmt.i_extra );
- }
+ fmt.i_extra = __MIN( p_auds->p_wf->cbSize,
+ p_auds->i_chunk_size - sizeof(WAVEFORMATEX) );
+ fmt.p_extra = &p_auds->p_wf[1];
msg_Dbg( p_input, "stream[%d] audio(0x%x) %d channels %dHz %dbits",
- i,
- p_auds->p_wf->wFormatTag, p_auds->p_wf->nChannels,
+ i, p_auds->p_wf->wFormatTag, p_auds->p_wf->nChannels,
p_auds->p_wf->nSamplesPerSec, p_auds->p_wf->wBitsPerSample);
break;
tk->i_samplesize = 0;
fmt.video.i_width = p_vids->p_bih->biWidth;
fmt.video.i_height = p_vids->p_bih->biHeight;
- if( ( fmt.i_extra = __MIN( p_vids->p_bih->biSize - sizeof( BITMAPINFOHEADER ),
- p_vids->i_chunk_size - sizeof(BITMAPINFOHEADER) ) ) > 0 )
- {
- fmt.p_extra = malloc( fmt.i_extra );
- memcpy( fmt.p_extra, &p_vids->p_bih[1], fmt.i_extra );
- }
+ fmt.i_extra =
+ __MIN( p_vids->p_bih->biSize - sizeof( BITMAPINFOHEADER ),
+ p_vids->i_chunk_size - sizeof(BITMAPINFOHEADER) );
+ fmt.p_extra = &p_vids->p_bih[1];
msg_Dbg( p_input, "stream[%d] video(%4.4s) %dx%d %dbpp %ffps",
i,
(char*)&p_vids->p_bih->biCompression,
* libmp4.c : LibMP4 library for mp4 module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: libmp4.c,v 1.34 2003/10/07 14:59:10 gbazin Exp $
+ * $Id: libmp4.c,v 1.35 2003/11/26 08:18:09 gbazin Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
MP4_READBOX_ENTER( MP4_Box_data_sample_soun_t );
+ /* Sanity check needed because the "wave" box does also contain an
+ * "mp4a" box that we don't understand. */
+ if( i_read < 28 )
+ {
+ i_read -= 30;
+ MP4_READBOX_EXIT( 0 );
+ }
+
for( i = 0; i < 6 ; i++ )
{
MP4_GET1BYTE( p_box->data.p_sample_soun->i_reserved1[i] );
/*
* XXX hack -> produce a copy of the nearly complete chunk
*/
- if( i_read > 0 )
- {
- p_box->data.p_sample_soun->i_qt_description = i_read;
- p_box->data.p_sample_soun->p_qt_description = malloc( i_read );
- memcpy( p_box->data.p_sample_soun->p_qt_description,
- p_peek,
- i_read );
- }
- else
- {
- p_box->data.p_sample_soun->i_qt_description = 0;
- p_box->data.p_sample_soun->p_qt_description = NULL;
- }
+ p_box->data.p_sample_soun->i_qt_description = i_read;
+ p_box->data.p_sample_soun->p_qt_description = malloc( i_read );
+ memcpy( p_box->data.p_sample_soun->p_qt_description, p_peek, i_read );
MP4_GET2BYTES( p_box->data.p_sample_soun->i_qt_version );
MP4_GET2BYTES( p_box->data.p_sample_soun->i_qt_revision_level );
* ogg.c : ogg stream input module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: ogg.c,v 1.46 2003/11/23 13:15:27 gbazin Exp $
+ * $Id: ogg.c,v 1.47 2003/11/26 08:18:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
* the sub-streams */
mtime_t i_pcr;
int b_reinit;
- int i_prev_sync_state;
/* stream state */
int i_eos;
/* Begnning of stream, tell the demux to look for elementary streams. */
p_ogg->i_eos = 0;
- p_ogg->i_prev_sync_state = SYNCHRO_REINIT;
-
return 0;
error:
p_stream->b_reinit = 1;
p_stream->i_pcr = -1;
p_stream->i_interpolated_pcr = -1;
+ ogg_stream_reset( &p_stream->os );
}
- if( p_ogg->i_prev_sync_state != SYNCHRO_REINIT )
- ogg_sync_reset( &p_ogg->oy );
+ ogg_sync_reset( &p_ogg->oy );
}
- p_ogg->i_prev_sync_state =
- p_input->stream.p_selected_program->i_synchro_state;
-
/*
* Demux an ogg page from the stream
*/
else
{
input_ClockManageRef( p_input,
- p_input->stream.p_selected_program, p_ogg->i_pcr );
+ p_input->stream.p_selected_program,
+ p_stream->i_pcr );
}
continue;
}
p_ogg->i_pcr = p_stream->i_interpolated_pcr;
}
- if( p_input->stream.p_selected_program->i_synchro_state != SYNCHRO_REINIT )
+ if( p_ogg->i_pcr >= 0 )
{
input_ClockManageRef( p_input, p_input->stream.p_selected_program,
p_ogg->i_pcr );
* mpeg4video.c: mpeg 4 video packetizer
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: mpeg4video.c,v 1.16 2003/11/18 20:15:38 fenrir Exp $
+ * $Id: mpeg4video.c,v 1.17 2003/11/26 08:18:09 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
p_sys->i_pts = 0;
p_sys->b_vop = VLC_FALSE;
p_sys->i_buffer = 0;
- p_sys->i_buffer_size = 10000;
- p_sys->p_buffer = malloc( p_sys->i_buffer_size );
+ p_sys->i_buffer_size = 0;
+ p_sys->p_buffer = 0;
/* Setup properties */
p_dec->fmt_out = p_dec->fmt_in;
{
decoder_t *p_dec = (decoder_t*)p_this;
+ if( p_dec->p_sys->p_buffer ) free( p_dec->p_sys->p_buffer );
free( p_dec->p_sys );
}
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.79 2003/11/24 23:22:01 gbazin Exp $
+ * $Id: input_dec.c,v 1.80 2003/11/26 08:18:09 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
}
if( p_dec->p_owner->p_sout )
+ {
sout_InputDelete( p_dec->p_owner->p_sout );
+ if( p_dec->p_owner->sout.i_extra ) free(p_dec->p_owner->sout.p_extra);
+ }
+
+ if( p_dec->fmt_in.i_extra ) free( p_dec->fmt_in.p_extra );
+ if( p_dec->fmt_out.i_extra ) free( p_dec->fmt_out.p_extra );
free( p_dec->p_owner );
}
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.240 2003/11/24 00:39:02 fenrir Exp $
+ * $Id: video_output.c,v 1.241 2003/11/26 08:18:09 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
if( var_Get( p_vout, "deinterlace-mode", &val ) == VLC_SUCCESS )
{
var_Set( p_vout, "deinterlace", val );
+ if( val.psz_string ) free( val.psz_string );
}
var_AddCallback( p_vout, "deinterlace", DeinterlaceCallback, NULL );
text.psz_string = _("Filters");
var_Change( p_vout, "filter", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_vout, "filter", VLC_VAR_INHERITVALUE, &val, NULL );
- if( var_Get( p_vout, "filter", &val ) == VLC_SUCCESS )
+ if( val.psz_string )
{
var_Set( p_vout, "filter", val );
+ free( val.psz_string );
}
var_AddCallback( p_vout, "filter", FilterCallback, NULL );
p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
+ if( p_vout->psz_filter_chain ) free( p_vout->psz_filter_chain );
+
/* Free structure */
vlc_object_destroy( p_vout );