Commit 83455b12 authored by Gildas Bazin's avatar Gildas Bazin

* modules/stream_out/transcode.c: fixed segfault.
parent 3b635f61
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* transcode.c * transcode.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: transcode.c,v 1.67 2004/01/17 11:41:21 gbazin Exp $ * $Id: transcode.c,v 1.68 2004/01/17 12:11:58 gbazin 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>
...@@ -1108,6 +1108,7 @@ static int transcode_video_ffmpeg_new( sout_stream_t *p_stream, ...@@ -1108,6 +1108,7 @@ static int transcode_video_ffmpeg_new( sout_stream_t *p_stream,
/* Close the encoder. /* Close the encoder.
* We'll open it only when we have the first frame */ * We'll open it only when we have the first frame */
module_Unneed( id->p_encoder, id->p_encoder->p_module ); module_Unneed( id->p_encoder, id->p_encoder->p_module );
id->p_encoder->p_module = NULL;
id->b_enc_inited = VLC_FALSE; id->b_enc_inited = VLC_FALSE;
...@@ -1125,6 +1126,7 @@ static void transcode_video_ffmpeg_close ( sout_stream_t *p_stream, ...@@ -1125,6 +1126,7 @@ static void transcode_video_ffmpeg_close ( sout_stream_t *p_stream,
} }
/* Close encoder */ /* Close encoder */
if( id->p_encoder->p_module )
module_Unneed( id->p_encoder, id->p_encoder->p_module ); module_Unneed( id->p_encoder, id->p_encoder->p_module );
vlc_object_destroy( id->p_encoder ); vlc_object_destroy( id->p_encoder );
......
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