Commit 4b59de99 authored by Christophe Massiot's avatar Christophe Massiot

* modules/stream_out/transcode.c: fixed a segfault when quitting.

parent 8c816feb
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* transcode.c: transcoding stream output module * transcode.c: transcoding stream output module
***************************************************************************** *****************************************************************************
* Copyright (C) 2003-2004 VideoLAN * Copyright (C) 2003-2004 VideoLAN
* $Id: transcode.c,v 1.76 2004/02/20 18:34:28 massiot Exp $ * $Id: transcode.c,v 1.77 2004/02/20 19:03:59 massiot Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -1205,6 +1205,14 @@ static int transcode_video_ffmpeg_new( sout_stream_t *p_stream, ...@@ -1205,6 +1205,14 @@ static int transcode_video_ffmpeg_new( sout_stream_t *p_stream,
static void transcode_video_ffmpeg_close ( sout_stream_t *p_stream, static void transcode_video_ffmpeg_close ( sout_stream_t *p_stream,
sout_stream_id_t *id ) sout_stream_id_t *id )
{ {
if ( p_stream->p_sys->i_threads >= 1 )
{
p_stream->p_sys->b_die = 1;
vlc_thread_join( p_stream->p_sys );
vlc_mutex_destroy( &p_stream->p_sys->lock_out );
vlc_cond_destroy( &p_stream->p_sys->cond );
}
/* Close decoder */ /* Close decoder */
if( id->ff_dec ) if( id->ff_dec )
{ {
...@@ -1242,13 +1250,6 @@ static void transcode_video_ffmpeg_close ( sout_stream_t *p_stream, ...@@ -1242,13 +1250,6 @@ static void transcode_video_ffmpeg_close ( sout_stream_t *p_stream,
{ {
img_resample_close( id->p_vresample ); img_resample_close( id->p_vresample );
} }
if ( p_stream->p_sys->i_threads >= 1 )
{
p_stream->p_sys->b_die = 1;
vlc_thread_join( p_stream->p_sys );
vlc_mutex_destroy( &p_stream->p_sys->lock_out );
vlc_cond_destroy( &p_stream->p_sys->cond );
}
} }
static int transcode_video_ffmpeg_process( sout_stream_t *p_stream, static int transcode_video_ffmpeg_process( sout_stream_t *p_stream,
......
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