From f8c7410eb9ec329a2dae56cb99270e3b7e5a1a5d Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Thu, 26 Feb 2004 17:07:37 +0000 Subject: [PATCH] * Don't crash during my demo to the university computer labs. - don't crash when i_output < 0 --- modules/codec/ffmpeg/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/codec/ffmpeg/audio.c b/modules/codec/ffmpeg/audio.c index a19934cf6a..10ad364d0d 100644 --- a/modules/codec/ffmpeg/audio.c +++ b/modules/codec/ffmpeg/audio.c @@ -2,7 +2,7 @@ * audio.c: audio decoder using ffmpeg library ***************************************************************************** * Copyright (C) 1999-2003 VideoLAN - * $Id: audio.c,v 1.28 2004/02/25 17:48:52 fenrir Exp $ + * $Id: audio.c,v 1.29 2004/02/26 17:07:37 hartman Exp $ * * Authors: Laurent Aimar * Gildas Bazin @@ -168,7 +168,7 @@ aout_buffer_t *E_( DecodeAudio )( decoder_t *p_dec, block_t **pp_block ) (int16_t*)p_sys->p_output, &i_output, p_block->p_buffer, p_block->i_buffer ); - if( i_used < 0 )//|| i_output == 0 ) + if( i_used < 0 || i_output < 0 ) { if( i_used < 0 ) msg_Warn( p_dec, "cannot decode one frame (%d bytes)", -- 2.39.2