From a0cb8b13c47a49fb6c12a2d6e95a706cdf210fa1 Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Sun, 23 Feb 2003 01:22:56 +0000 Subject: Fix crash when opening ffmpeg decoder fails CVS patchset: 4259 CVS date: 2003/02/23 01:22:56 --- src/libffmpeg/xine_decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index 2a89567be..14d9579da 100644 --- a/src/libffmpeg/xine_decoder.c +++ b/src/libffmpeg/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.96 2003/02/22 17:32:31 guenter Exp $ + * $Id: xine_decoder.c,v 1.97 2003/02/23 01:22:56 jstembridge Exp $ * * xine decoder plugin using ffmpeg * @@ -151,6 +151,7 @@ static void init_video_codec (ff_video_decoder_t *this, xine_bmiheader *bih) { if (avcodec_open (this->context, this->codec) < 0) { printf ("ffmpeg: couldn't open decoder\n"); free(this->context); + this->context = NULL; this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = 0; return; } -- cgit v1.2.3