Commit 0081a1d0 authored by Gildas Bazin's avatar Gildas Bazin

* ALL: backport of 13468 13539 13545 13547 13548 13550 13578 13601 13602.

parent 93a78fbb
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* access.c: Real rtsp input * access.c: Real rtsp input
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* $Id: file.c 10310 2005-03-11 22:36:40Z anil $ * $Id$
* *
* Authors: Gildas Bazin <gbazin@videolan.org> * Authors: Gildas Bazin <gbazin@videolan.org>
* *
...@@ -220,6 +220,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -220,6 +220,7 @@ static int Open( vlc_object_t *p_this )
p_sys->p_header = block_New( p_access, 4096 ); p_sys->p_header = block_New( p_access, 4096 );
p_sys->p_header->i_buffer = p_sys->p_header->i_buffer =
rmff_dump_header( h, p_sys->p_header->p_buffer, 1024 ); rmff_dump_header( h, p_sys->p_header->p_buffer, 1024 );
rmff_free_header( h );
} }
else else
{ {
...@@ -231,6 +232,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -231,6 +232,7 @@ static int Open( vlc_object_t *p_this )
var_Create( p_access, "realrtsp-caching", var_Create( p_access, "realrtsp-caching",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
if( psz_server ) free( psz_server );
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* *
* $Id: asmrp.c,v 1.8 2004/08/27 18:34:16 miguelfreitas Exp $ * $Id$
* *
* a parser for real's asm rules * a parser for real's asm rules
* *
...@@ -94,6 +94,7 @@ static asmrp_t *asmrp_new () { ...@@ -94,6 +94,7 @@ static asmrp_t *asmrp_new () {
p->sym_tab_num = 0; p->sym_tab_num = 0;
p->sym = ASMRP_SYM_NONE; p->sym = ASMRP_SYM_NONE;
p->buf = 0;
return p; return p;
} }
...@@ -105,6 +106,7 @@ static void asmrp_dispose (asmrp_t *p) { ...@@ -105,6 +106,7 @@ static void asmrp_dispose (asmrp_t *p) {
for (i=0; i<p->sym_tab_num; i++) for (i=0; i<p->sym_tab_num; i++)
free (p->sym_tab[i].id); free (p->sym_tab[i].id);
if (p->buf) free (p->buf);
free (p); free (p);
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* *
* $Id: sdpplin.c,v 1.5 2004/04/23 21:59:04 miguelfreitas Exp $ * $Id$
* *
* sdp/sdpplin parser. * sdp/sdpplin parser.
* *
...@@ -313,9 +313,10 @@ void sdpplin_free(sdpplin_t *description) { ...@@ -313,9 +313,10 @@ void sdpplin_free(sdpplin_t *description) {
if( description->stream[i]->mlti_data ) free( description->stream[i]->mlti_data ); if( description->stream[i]->mlti_data ) free( description->stream[i]->mlti_data );
if( description->stream[i]->rmff_flags ) free( description->stream[i]->rmff_flags ); if( description->stream[i]->rmff_flags ) free( description->stream[i]->rmff_flags );
if( description->stream[i]->asm_rule_book ) free( description->stream[i]->asm_rule_book ); if( description->stream[i]->asm_rule_book ) free( description->stream[i]->asm_rule_book );
free( description->stream[i] );
} }
} }
free( description->stream ); if( description->stream_count ) free( description->stream );
if( description->owner ) free( description->owner ); if( description->owner ) free( description->owner );
if( description->session_name ) free( description->session_name ); if( description->session_name ) free( description->session_name );
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2004 the xine project * Copyright (C) 2002-2004 the xine project
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* $Id: file.c 10310 2005-03-11 22:36:40Z anil $ * $Id$
* *
* Authors: Gildas Bazin <gbazin@videolan.org> * Authors: Gildas Bazin <gbazin@videolan.org>
* Adapted from xine which itself adapted it from joschkas real tools. * Adapted from xine which itself adapted it from joschkas real tools.
...@@ -239,8 +239,7 @@ static int rtsp_get_answers( rtsp_client_t *rtsp ) ...@@ -239,8 +239,7 @@ static int rtsp_get_answers( rtsp_client_t *rtsp )
char *buf = malloc( strlen(answer) ); char *buf = malloc( strlen(answer) );
sscanf( answer, "%*s %s", buf ); sscanf( answer, "%*s %s", buf );
if( rtsp->p_private->server ) free( rtsp->p_private->server ); if( rtsp->p_private->server ) free( rtsp->p_private->server );
rtsp->p_private->server = strdup( buf ); rtsp->p_private->server = buf;
free( buf );
} }
if( !strncasecmp( answer, "Session:", 8 ) ) if( !strncasecmp( answer, "Session:", 8 ) )
{ {
...@@ -400,7 +399,7 @@ int rtsp_read_data( rtsp_client_t *rtsp, char *buffer, unsigned int size ) ...@@ -400,7 +399,7 @@ int rtsp_read_data( rtsp_client_t *rtsp, char *buffer, unsigned int size )
if( size >= 4 ) if( size >= 4 )
{ {
i= rtsp->pf_read( rtsp->p_userdata, buffer, 4 ); i = rtsp->pf_read( rtsp->p_userdata, buffer, 4 );
if( i < 4 ) return i; if( i < 4 ) return i;
if( buffer[0]=='S' && buffer[1]=='E' && buffer[2]=='T' && if( buffer[0]=='S' && buffer[1]=='E' && buffer[2]=='T' &&
...@@ -418,13 +417,13 @@ int rtsp_read_data( rtsp_client_t *rtsp, char *buffer, unsigned int size ) ...@@ -418,13 +417,13 @@ int rtsp_read_data( rtsp_client_t *rtsp, char *buffer, unsigned int size )
if( !strncasecmp( rest, "Cseq:", 5 ) ) if( !strncasecmp( rest, "Cseq:", 5 ) )
sscanf( rest, "%*s %u", &seq ); sscanf( rest, "%*s %u", &seq );
} while( strlen(rest) != 0 ); } while( *rest );
free( rest ); free( rest );
if( seq < 0 ) if( seq < 0 )
{ {
fprintf(stderr, "warning: cseq not recognized!\n"); fprintf(stderr, "warning: cseq not recognized!\n");
seq=1; seq = 1;
} }
/* lets make the server happy */ /* lets make the server happy */
...@@ -433,7 +432,8 @@ int rtsp_read_data( rtsp_client_t *rtsp, char *buffer, unsigned int size ) ...@@ -433,7 +432,8 @@ int rtsp_read_data( rtsp_client_t *rtsp, char *buffer, unsigned int size )
sprintf( rest,"CSeq: %u", seq ); sprintf( rest,"CSeq: %u", seq );
rtsp_put( rtsp, rest ); rtsp_put( rtsp, rest );
rtsp_put( rtsp, "" ); rtsp_put( rtsp, "" );
rtsp->pf_read( rtsp->p_userdata, buffer, size ); free( rest );
i = rtsp->pf_read( rtsp->p_userdata, buffer, size );
} }
else else
{ {
...@@ -441,7 +441,7 @@ int rtsp_read_data( rtsp_client_t *rtsp, char *buffer, unsigned int size ) ...@@ -441,7 +441,7 @@ int rtsp_read_data( rtsp_client_t *rtsp, char *buffer, unsigned int size )
i += 4; i += 4;
} }
} }
else i= rtsp->pf_read( rtsp->p_userdata, buffer, size ); else i = rtsp->pf_read( rtsp->p_userdata, buffer, size );
//fprintf( stderr, "<< %d of %d bytes\n", i, size ); //fprintf( stderr, "<< %d of %d bytes\n", i, size );
...@@ -514,6 +514,7 @@ int rtsp_connect( rtsp_client_t *rtsp, const char *psz_mrl, ...@@ -514,6 +514,7 @@ int rtsp_connect( rtsp_client_t *rtsp, const char *psz_mrl,
if( s->port < 0 || s->port > 65535 ) s->port = 554; if( s->port < 0 || s->port > 65535 ) s->port = 554;
} }
free( mrl_ptr );
fprintf( stderr, "got mrl: %s %i %s\n", s->host, s->port, s->path ); fprintf( stderr, "got mrl: %s %i %s\n", s->host, s->port, s->path );
s->s = rtsp->pf_connect( rtsp->p_userdata, s->host, s->port ); s->s = rtsp->pf_connect( rtsp->p_userdata, s->host, s->port );
...@@ -561,6 +562,7 @@ void rtsp_close( rtsp_client_t *rtsp ) ...@@ -561,6 +562,7 @@ void rtsp_close( rtsp_client_t *rtsp )
if( rtsp->p_private->mrl ) free( rtsp->p_private->mrl ); if( rtsp->p_private->mrl ) free( rtsp->p_private->mrl );
if( rtsp->p_private->session ) free( rtsp->p_private->session ); if( rtsp->p_private->session ) free( rtsp->p_private->session );
if( rtsp->p_private->user_agent ) free( rtsp->p_private->user_agent ); if( rtsp->p_private->user_agent ) free( rtsp->p_private->user_agent );
if( rtsp->p_private->server ) free( rtsp->p_private->server );
rtsp_free_answers( rtsp ); rtsp_free_answers( rtsp );
rtsp_unschedule_all( rtsp ); rtsp_unschedule_all( rtsp );
free( rtsp->p_private ); free( rtsp->p_private );
......
...@@ -315,7 +315,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -315,7 +315,6 @@ static int Open( vlc_object_t *p_this )
} }
p_sys->b_playing = VLC_FALSE; p_sys->b_playing = VLC_FALSE;
p_sys->start_date = 0; p_sys->start_date = 0;
p_sys->p_status = (snd_pcm_status_t *)malloc(snd_pcm_status_sizeof());
vlc_cond_init( p_aout, &p_sys->wait ); vlc_cond_init( p_aout, &p_sys->wait );
vlc_mutex_init( p_aout, &p_sys->lock ); vlc_mutex_init( p_aout, &p_sys->lock );
...@@ -727,7 +726,6 @@ static void Close( vlc_object_t *p_this ) ...@@ -727,7 +726,6 @@ static void Close( vlc_object_t *p_this )
snd_output_close( p_sys->p_snd_stderr ); snd_output_close( p_sys->p_snd_stderr );
#endif #endif
free( p_sys->p_status );
free( p_sys ); free( p_sys );
} }
...@@ -736,6 +734,9 @@ static void Close( vlc_object_t *p_this ) ...@@ -736,6 +734,9 @@ static void Close( vlc_object_t *p_this )
*****************************************************************************/ *****************************************************************************/
static int ALSAThread( aout_instance_t * p_aout ) static int ALSAThread( aout_instance_t * p_aout )
{ {
p_aout->output.p_sys->p_status =
(snd_pcm_status_t *)malloc(snd_pcm_status_sizeof());
/* Wait for the exact time to start playing (avoids resampling) */ /* Wait for the exact time to start playing (avoids resampling) */
vlc_mutex_lock( &p_aout->output.p_sys->lock ); vlc_mutex_lock( &p_aout->output.p_sys->lock );
if( !p_aout->output.p_sys->start_date ) if( !p_aout->output.p_sys->start_date )
...@@ -750,6 +751,7 @@ static int ALSAThread( aout_instance_t * p_aout ) ...@@ -750,6 +751,7 @@ static int ALSAThread( aout_instance_t * p_aout )
ALSAFill( p_aout ); ALSAFill( p_aout );
} }
free( p_aout->output.p_sys->p_status );
return 0; return 0;
} }
......
...@@ -897,6 +897,11 @@ static struct ...@@ -897,6 +897,11 @@ static struct
VIDEO_ES, "PAM Image" }, VIDEO_ES, "PAM Image" },
#endif #endif
#if LIBAVCODEC_BUILD > ((50<<16)+(1<<8)+0)
{ VLC_FOURCC('b','m','p',' '), CODEC_ID_BMP,
VIDEO_ES, "BMP Image" },
#endif
/* /*
* Audio Codecs * Audio Codecs
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* realaudio.c: a realaudio decoder that uses the realaudio library/dll * realaudio.c: a realaudio decoder that uses the realaudio library/dll
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 the VideoLAN team * Copyright (C) 2005 the VideoLAN team
* $Id: quicktime.c 11664 2005-07-09 06:17:09Z courmisch $ * $Id$
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -81,6 +81,7 @@ struct decoder_sys_t ...@@ -81,6 +81,7 @@ struct decoder_sys_t
/* Frame buffer for data reordering */ /* Frame buffer for data reordering */
int i_subpacket; int i_subpacket;
mtime_t i_packet_pts;
int i_frame_size; int i_frame_size;
char *p_frame; char *p_frame;
int i_frame; int i_frame;
...@@ -237,6 +238,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -237,6 +238,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_frame_size = p_sys->i_frame_size =
p_dec->fmt_in.audio.i_blockalign * p_sys->i_subpacket_h; p_dec->fmt_in.audio.i_blockalign * p_sys->i_subpacket_h;
p_sys->p_frame = malloc( p_sys->i_frame_size ); p_sys->p_frame = malloc( p_sys->i_frame_size );
p_sys->i_packet_pts = 0;
p_sys->i_subpacket = 0; p_sys->i_subpacket = 0;
p_sys->i_frame = 0; p_sys->i_frame = 0;
...@@ -696,6 +698,17 @@ static aout_buffer_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -696,6 +698,17 @@ static aout_buffer_t *Decode( decoder_t *p_dec, block_t **pp_block )
//msg_Err( p_dec, "Decode: "I64Fd", %i", p_block->i_pts, p_block->i_buffer ); //msg_Err( p_dec, "Decode: "I64Fd", %i", p_block->i_pts, p_block->i_buffer );
/* Detect missing subpackets */
if( p_sys->i_subpacket && p_block->i_pts > 0 &&
p_block->i_pts != p_sys->i_packet_pts )
{
/* All subpackets in a packet should have the same pts so we must
* have dropped some. Clear current frame buffer. */
p_sys->i_subpacket = 0;
msg_Dbg( p_dec, "detected dropped subpackets" );
}
if( p_block->i_pts > 0 ) p_sys->i_packet_pts = p_block->i_pts;
/* Date management */ /* Date management */
if( /* !p_sys->i_subpacket && */ p_block && p_block->i_pts > 0 && if( /* !p_sys->i_subpacket && */ p_block && p_block->i_pts > 0 &&
p_block->i_pts != aout_DateGet( &p_sys->end_date ) ) p_block->i_pts != aout_DateGet( &p_sys->end_date ) )
......
...@@ -1041,21 +1041,14 @@ public: ...@@ -1041,21 +1041,14 @@ public:
{ {
delete tracks[i_track]->p_compression_data; delete tracks[i_track]->p_compression_data;
} }
if( tracks[i_track]->fmt.psz_description ) es_format_Clean( &tracks[i_track]->fmt );
{ if( tracks[i_track]->p_extra_data )
free( tracks[i_track]->fmt.psz_description ); free( tracks[i_track]->p_extra_data );
}
if( tracks[i_track]->psz_codec ) if( tracks[i_track]->psz_codec )
{
free( tracks[i_track]->psz_codec ); free( tracks[i_track]->psz_codec );
}
if( tracks[i_track]->fmt.psz_language )
{
free( tracks[i_track]->fmt.psz_language );
}
delete tracks[i_track]; delete tracks[i_track];
} }
if( psz_writing_application ) if( psz_writing_application )
{ {
free( psz_writing_application ); free( psz_writing_application );
...@@ -1334,6 +1327,11 @@ public: ...@@ -1334,6 +1327,11 @@ public:
delete opened_segments[i]; delete opened_segments[i];
for ( i=0; i<used_segments.size(); i++ ) for ( i=0; i<used_segments.size(); i++ )
delete used_segments[i]; delete used_segments[i];
if( meta ) vlc_meta_Delete( meta );
while( titles.size() )
{ vlc_input_title_Delete( titles.back() ); titles.pop_back();}
vlc_mutex_destroy( &lock_demuxer ); vlc_mutex_destroy( &lock_demuxer );
} }
......
...@@ -146,18 +146,12 @@ static void Close( vlc_object_t *p_this ) ...@@ -146,18 +146,12 @@ static void Close( vlc_object_t *p_this )
{ {
real_track_t *tk = p_sys->track[i]; real_track_t *tk = p_sys->track[i];
if( tk->p_frame ) if( tk->p_frame ) block_Release( tk->p_frame );
{ es_format_Clean( &tk->fmt );
block_Release( tk->p_frame );
}
free( tk ); free( tk );
} }
if( p_sys->i_track > 0 ) if( p_sys->i_track > 0 ) free( p_sys->track );
{
free( p_sys->track );
}
free( p_sys ); free( p_sys );
} }
...@@ -218,10 +212,7 @@ static int Demux( demux_t *p_demux ) ...@@ -218,10 +212,7 @@ static int Demux( demux_t *p_demux )
for( i = 0; i < p_sys->i_track; i++ ) for( i = 0; i < p_sys->i_track; i++ )
{ {
if( p_sys->track[i]->i_id == i_id ) if( p_sys->track[i]->i_id == i_id ) tk = p_sys->track[i];
{
tk = p_sys->track[i];
}
} }
if( tk == NULL ) if( tk == NULL )
......
...@@ -242,6 +242,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -242,6 +242,7 @@ static void Close( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this; decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys = p_dec->p_sys; decoder_sys_t *p_sys = p_dec->p_sys;
if( p_sys->p_frame ) block_ChainRelease( p_sys->p_frame );
if( p_sys->p_sps ) block_Release( p_sys->p_sps ); if( p_sys->p_sps ) block_Release( p_sys->p_sps );
if( p_sys->p_pps ) block_Release( p_sys->p_pps ); if( p_sys->p_pps ) block_Release( p_sys->p_pps );
block_BytestreamRelease( &p_sys->bytestream ); block_BytestreamRelease( &p_sys->bytestream );
...@@ -384,6 +385,7 @@ static block_t *PacketizeAVC1( decoder_t *p_dec, block_t **pp_block ) ...@@ -384,6 +385,7 @@ static block_t *PacketizeAVC1( decoder_t *p_dec, block_t **pp_block )
} }
p += i_size; p += i_size;
} }
block_Release( p_block );
return p_ret; return p_ret;
} }
......
<html> <html>
<head> <head>
<title>VLC media player - Browser</title> <title>VLC media player - Browser</title>
<link href="/style.css" title="Default" rel="stylesheet" type="text/css" />
<vlc id="if" param1="'control' url_extract strlen"/> <vlc id="if" param1="'control' url_extract strlen"/>
<meta http-equiv="refresh" content="0;URL=/admin/browse.html?dir=<vlc id="value" param1="'dir' url_extract" />" /> <meta http-equiv="refresh" content="0;URL=/admin/browse.html?dir=<vlc id="value" param1="'dir' url_extract" />" />
...@@ -18,9 +19,11 @@ ...@@ -18,9 +19,11 @@
<th align="left" bgcolor="#cccccc">Date</th> <th align="left" bgcolor="#cccccc">Date</th>
</tr> </tr>
<p>This page is default disabled for security reasons (change _directory_ into directory to enable it).</p> <p>This page is default disabled for security reasons (change _directory_ into directory to enable it).</p>
<vlc id="rpn" param1="counter 0 store" />
<vlc id="rpn" param1="'dir' url_extract" /> <vlc id="rpn" param1="'dir' url_extract" />
<vlc id="foreach" param1="file" param2="_directory_" /> <vlc id="foreach" param1="file" param2="_directory_" />
<tr> <vlc id="rpn" param1="counter counter value 1 + store" />
<tr class="<vlc id="if" param1="counter value 2 % 0 =" />line1<vlc id="else" />line2<vlc id="end" />">
<td> <td>
<vlc id="if" param1="file.type value 'directory' strcmp 0 =" /> <vlc id="if" param1="file.type value 'directory' strcmp 0 =" />
<img src="/icons/dir.gif" alt=[DIR]" border="0" width="20" height="22"> <img src="/icons/dir.gif" alt=[DIR]" border="0" width="20" height="22">
...@@ -46,4 +49,3 @@ ...@@ -46,4 +49,3 @@
<p><vlc id="value" param1="copyright" /> </p> <p><vlc id="value" param1="copyright" /> </p>
</body> </body>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment