Commit 98d646ed authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/menus.cpp: small fix.

* modules/codec/quicktime.c: compilation fix on win32.
* modules/demux/avi/avi.c: small hack to avoid eating all the resources on broken files.
parent ce6550ef
......@@ -2,7 +2,7 @@
* quicktime.c: a quicktime decoder that uses the QT library/dll
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: quicktime.c,v 1.19 2003/11/23 22:18:08 hartman Exp $
* $Id: quicktime.c,v 1.20 2003/11/24 13:40:03 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir at via.ecp.fr>
* Derk-Jan Hartman <thedj at users.sf.net>
......@@ -134,6 +134,7 @@ struct decoder_sys_t
unsigned int InFrameSize;
unsigned int OutFrameSize;
#ifndef WIN32
/* Video */
Component (*FindNextComponent)
( Component prev, ComponentDescription* desc );
......@@ -172,7 +173,7 @@ struct decoder_sys_t
CodecDecompressParams decpar; /* for ImageCodecPreDecompress()*/
CodecCapabilities codeccap; /* for decpar */
#endif
/* Output properties */
uint8_t * plane;
......@@ -630,6 +631,7 @@ static int OpenVideo( decoder_t *p_dec )
{
decoder_sys_t *p_sys = malloc( sizeof( decoder_sys_t ) );
#ifndef WIN32
vlc_value_t lockval;
long i_result;
ComponentDescription desc;
......@@ -803,9 +805,13 @@ exit_error:
Restore_LDT_Keeper( p_sys->ldt_fs );
#endif
vlc_mutex_unlock( lockval.p_address );
#endif /* !WIN32 */
return VLC_EGENERIC;
}
#ifndef WIN32
/*****************************************************************************
* DecodeVideo:
*****************************************************************************/
......@@ -888,6 +894,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
return p_pic;
}
#endif /* !WIN32 */
/*****************************************************************************
* QTAudioInit:
......@@ -950,7 +957,7 @@ static int QTAudioInit( decoder_t *p_dec )
return VLC_SUCCESS;
}
#ifndef WIN32
/*****************************************************************************
* QTVideoInit:
*****************************************************************************/
......@@ -1015,5 +1022,4 @@ static int QTVideoInit( decoder_t *p_dec )
return VLC_SUCCESS;
}
#endif /* !WIN32 */
......@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.75 2003/11/23 13:15:27 gbazin Exp $
* $Id: avi.c,v 1.76 2003/11/24 13:40:03 gbazin Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -1683,8 +1683,9 @@ static int AVI_PacketRead( input_thread_t *p_input,
static int AVI_PacketSearch( input_thread_t *p_input )
{
demux_sys_t *p_sys = p_input->p_demux_data;
avi_packet_t avi_pk;
int i_count = 0;
for( ;; )
{
if( stream_Read( p_input->s, NULL, 1 ) != 1 )
......@@ -1705,6 +1706,19 @@ static int AVI_PacketSearch( input_thread_t *p_input )
case AVIFOURCC_idx1:
return VLC_SUCCESS;
}
/* Prevents from eating all the CPU with broken files.
* This value should be low enough so that it doesn't affect the
* reading speed too much (not that we care much anyway because
* this code is called only on broken files). */
if( !(++i_count % 1024) )
{
if( p_input->b_die ) return VLC_EGENERIC;
msleep( 10000 );
if( !(i_count % (1024 * 10)) )
msg_Warn( p_input, "trying to resync..." );
}
}
}
......
......@@ -2,7 +2,7 @@
* menus.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: menus.cpp,v 1.25 2003/11/23 20:37:04 gbazin Exp $
* $Id: menus.cpp,v 1.26 2003/11/24 13:40:03 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -305,7 +305,6 @@ wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent )
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "x11-on-top";
pi_objects[i++] = p_object->i_object_id;
vlc_object_release( p_object );
p_dec_obj = (vlc_object_t *)vlc_object_find( p_object,
VLC_OBJECT_DECODER,
......
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