Changeset b73f6722b19f7e553f7516d7533eeed6074b6ea3
- Timestamp:
- 06/02/02 13:59:46 (6 years ago)
- git-parent:
- Files:
-
- ChangeLog (modified) (2 diffs)
- include/input_ext-intf.h (modified) (3 diffs)
- plugins/gtk/gtk_display.c (modified) (2 diffs)
- plugins/win32/mainframe.cpp (modified) (1 diff)
- src/input/input.c (modified) (12 diffs)
- src/input/mpeg_system.c (modified) (2 diffs)
- src/playlist/playlist.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ChangeLog
r211d6ba rb73f672 5 5 HEAD 6 6 7 * ./src/playlist/playlist.c, src/input/input.c: added safety checks to 8 prevent crashes on next file. 7 9 * ./src/misc/objects.c: commented all functions. 8 10 * ./src/misc/objects.c: implemented vlc_object_find( , , FIND_ANYWHERE). … … 31 33 32 34 0.4.1 33 35 Not released yet 36 37 * ./plugins/gtk/gtk_display.c, ./plugins/win32/mainframe.cpp: we deactivate 38 popup menus when no stream is being played, even in network mode. 39 * ./src/input/mpeg_system.c: removed unnecessarily verbose message. 34 40 * ./src/video_output/video_output.c: fixed the "picture has invalid status" 35 41 bug which might have been the cause of crashes. include/input_ext-intf.h
r71ec135 rb73f672 5 5 ***************************************************************************** 6 6 * Copyright (C) 1999, 2000 VideoLAN 7 * $Id: input_ext-intf.h,v 1.6 8 2002/06/01 18:04:48sam Exp $7 * $Id: input_ext-intf.h,v 1.69 2002/06/02 11:59:46 sam Exp $ 8 8 * 9 9 * Authors: Christophe Massiot <massiot@via.ecp.fr> … … 248 248 VLC_COMMON_MEMBERS 249 249 250 /* Thread properties and locks*/250 /* Thread properties */ 251 251 vlc_bool_t b_eof; 252 int i_status; /* status flag */253 252 254 253 /* Access module */ … … 329 328 input_thread_t * __input_CreateThread ( vlc_object_t *, 330 329 playlist_item_t *, int * ); 331 void input_StopThread ( input_thread_t * , int *pi_status);330 void input_StopThread ( input_thread_t * ); 332 331 void input_DestroyThread ( input_thread_t * ); 333 332 plugins/gtk/gtk_display.c
r211d6ba rb73f672 3 3 ***************************************************************************** 4 4 * Copyright (C) 1999, 2000 VideoLAN 5 * $Id: gtk_display.c,v 1.2 4 2002/06/02 09:03:54sam Exp $5 * $Id: gtk_display.c,v 1.25 2002/06/02 11:59:46 sam Exp $ 6 6 * 7 7 * Authors: Samuel Hocevar <sam@zoy.org> … … 202 202 gtk_label_set_text( GTK_LABEL( p_label ), "" ); 203 203 gtk_widget_show( GTK_WIDGET( p_file_box ) ); 204 205 /* unsensitize menus */ 206 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_program"),207 FALSE );208 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_title"),FALSE );209 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_chapter"),210 FALSE );211 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_audio"),FALSE );212 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_subpictures"),213 FALSE );214 gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"),215 FALSE );216 gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_audio"),FALSE );217 gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_subpictures"),218 FALSE );219 }204 } 205 206 /* unsensitize menus */ 207 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_program"), 208 FALSE ); 209 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_title"), FALSE ); 210 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_chapter"), 211 FALSE ); 212 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_audio"), FALSE ); 213 gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_subpictures"), 214 FALSE ); 215 gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"), 216 FALSE ); 217 gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_audio"), FALSE ); 218 gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_subpictures"), 219 FALSE ); 220 220 } 221 221 plugins/win32/mainframe.cpp
r71ec135 rb73f672 668 668 * nothing is displayed; isn't it nicer ? :) */ 669 669 i_Height += 17; 670 671 /* unsensitize menus */672 MenuProgram->Enabled = false;673 MenuTitle->Enabled = false;674 MenuChapter->Enabled = false;675 MenuAudio->Enabled = false;676 MenuSubtitles->Enabled = false;677 PopupNavigation->Enabled = false;678 PopupAudio->Enabled = false;679 PopupSubtitles->Enabled = false;680 670 } 671 672 /* unsensitize menus */ 673 MenuProgram->Enabled = false; 674 MenuTitle->Enabled = false; 675 MenuChapter->Enabled = false; 676 MenuAudio->Enabled = false; 677 MenuSubtitles->Enabled = false; 678 PopupNavigation->Enabled = false; 679 PopupAudio->Enabled = false; 680 PopupSubtitles->Enabled = false; 681 681 } 682 682 src/input/input.c
r71ec135 rb73f672 5 5 ***************************************************************************** 6 6 * Copyright (C) 1998-2001 VideoLAN 7 * $Id: input.c,v 1. 199 2002/06/01 18:04:49sam Exp $7 * $Id: input.c,v 1.200 2002/06/02 11:59:46 sam Exp $ 8 8 * 9 9 * Authors: Christophe Massiot <massiot@via.ecp.fr> … … 58 58 static void ErrorThread ( input_thread_t *p_input ); 59 59 static void CloseThread ( input_thread_t *p_input ); 60 static void DestroyThread ( input_thread_t *p_input );61 60 static void EndThread ( input_thread_t *p_input ); 62 61 … … 87 86 /* Set target */ 88 87 p_input->psz_source = strdup( p_item->psz_name ); 89 90 /* Set status */91 p_input->i_status = THREAD_CREATE;92 88 93 89 /* Demux */ … … 157 153 vlc_object_attach( p_input, p_parent ); 158 154 159 /* Create thread . */155 /* Create thread and wait for its readiness. */ 160 156 if( vlc_thread_create( p_input, "input", RunThread, 1 ) ) 161 157 { … … 165 161 } 166 162 167 #if 0168 /* If status is NULL, wait until the thread is created */169 if( pi_status == NULL )170 {171 do172 {173 msleep( THREAD_SLEEP );174 } while( (i_status != THREAD_READY) && (i_status != THREAD_ERROR)175 && (i_status != THREAD_FATAL) );176 }177 #endif178 179 163 return p_input; 180 164 } … … 185 169 * This function should not return until the thread is effectively cancelled. 186 170 *****************************************************************************/ 187 void input_StopThread( input_thread_t *p_input , int *pi_status)171 void input_StopThread( input_thread_t *p_input ) 188 172 { 189 173 /* Make the thread exit from a possible vlc_cond_wait() */ … … 194 178 vlc_cond_signal( &p_input->stream.stream_wait ); 195 179 vlc_mutex_unlock( &p_input->stream.stream_lock ); 196 197 /* If status is NULL, wait until thread has been destroyed */198 #if 0199 if( pi_status == NULL )200 {201 do202 {203 msleep( THREAD_SLEEP );204 } while ( (i_status != THREAD_OVER) && (i_status != THREAD_ERROR)205 && (i_status != THREAD_FATAL) );206 }207 #endif208 180 } 209 181 … … 222 194 vlc_cond_destroy( &p_input->stream.stream_wait ); 223 195 vlc_mutex_destroy( &p_input->stream.stream_lock ); 224 225 /* Free input structure */226 free( p_input );227 196 } 228 197 … … 237 206 { 238 207 /* If we failed, wait before we are killed, and exit */ 239 p_input->i_status = THREAD_ERROR;240 208 p_input->b_error = 1; 241 209 vlc_thread_ready( p_input ); 242 210 ErrorThread( p_input ); 243 DestroyThread( p_input );244 211 return 0; 245 212 } 246 213 247 214 vlc_thread_ready( p_input ); 248 249 p_input->i_status = THREAD_READY;250 215 251 216 /* initialization is complete */ … … 393 358 394 359 EndThread( p_input ); 395 396 DestroyThread( p_input );397 360 398 361 return 0; … … 584 547 input_DumpStream( p_input ); 585 548 586 /* Store status*/587 p_input-> i_status = THREAD_END;549 /* Tell we're dead */ 550 p_input->b_dead = 1; 588 551 589 552 /* Free all ES and destroy all decoder threads */ … … 611 574 } 612 575 613 /*****************************************************************************614 * DestroyThread: destroy the input thread615 *****************************************************************************/616 static void DestroyThread( input_thread_t * p_input )617 {618 /* Update status */619 p_input->i_status = THREAD_OVER;620 }621 src/input/mpeg_system.c
r9e3ab28 rb73f672 3 3 ***************************************************************************** 4 4 * Copyright (C) 1998-2001 VideoLAN 5 * $Id: mpeg_system.c,v 1.9 8 2002/06/01 12:32:01sam Exp $5 * $Id: mpeg_system.c,v 1.99 2002/06/02 11:59:46 sam Exp $ 6 6 * 7 7 * Authors: Christophe Massiot <massiot@via.ecp.fr> … … 1227 1227 * (except PCR that have already been handled), we can trash 1228 1228 * the packet. */ 1229 msg_Warn( p_input,1230 "packet without payload received by TS demux" );1231 1229 b_trash = 1; 1232 1230 } src/playlist/playlist.c
r211d6ba rb73f672 3 3 ***************************************************************************** 4 4 * Copyright (C) 1999-2001 VideoLAN 5 * $Id: playlist.c,v 1. 3 2002/06/02 09:03:54sam Exp $5 * $Id: playlist.c,v 1.4 2002/06/02 11:59:46 sam Exp $ 6 6 * 7 7 * Authors: Samuel Hocevar <sam@zoy.org> … … 159 159 * playlist_Command: do a playlist action 160 160 ***************************************************************************** 161 * Delete the item in the playlist with position i_pos.161 * 162 162 *****************************************************************************/ 163 163 void playlist_Command( playlist_t * p_playlist, int i_command, int i_arg ) … … 200 200 if( p_playlist->p_input ) 201 201 { 202 if( p_playlist->p_input-> i_status == THREAD_OVER)202 if( p_playlist->p_input->b_dead ) 203 203 { 204 204 input_thread_t *p_input; … … 214 214 vlc_object_release( p_input ); 215 215 input_DestroyThread( p_input ); 216 } 217 else if( ( p_playlist->p_input->i_status == THREAD_READY 218 || p_playlist->p_input->i_status == THREAD_ERROR ) 219 && ( p_playlist->p_input->b_error 220 || p_playlist->p_input->b_eof ) ) 221 { 222 input_StopThread( p_playlist->p_input, NULL ); 216 vlc_object_destroy( p_input ); 217 } 218 else if( p_playlist->p_input->b_error 219 || p_playlist->p_input->b_eof ) 220 { 221 input_StopThread( p_playlist->p_input ); 223 222 } 224 223 } … … 258 257 while( p_playlist->p_input ) 259 258 { 260 if( p_playlist->p_input-> i_status == THREAD_OVER)259 if( p_playlist->p_input->b_dead ) 261 260 { 262 261 input_thread_t *p_input; … … 272 271 vlc_object_release( p_input ); 273 272 input_DestroyThread( p_input ); 274 } 275 else if( ( p_playlist->p_input->i_status == THREAD_READY 276 || p_playlist->p_input->i_status == THREAD_ERROR ) 277 && ( p_playlist->p_input->b_error 278 || p_playlist->p_input->b_eof ) ) 279 { 280 input_StopThread( p_playlist->p_input, NULL ); 273 vlc_object_destroy( p_input ); 274 } 275 else if( p_playlist->p_input->b_error || p_playlist->p_input->b_eof ) 276 { 277 input_StopThread( p_playlist->p_input ); 281 278 } 282 279 else
