diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2001-11-18 13:44:53 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2001-11-18 13:44:53 +0000 |
commit | cf45a6df3ddbb900ca213cf300244cd017bc1d2c (patch) | |
tree | 3d2995ecfc239062f41b2dea4a40289476fb23ed /src/libw32dll/w32codec.c | |
parent | 1dba676b89fc09963312acecfe8c367c9200a870 (diff) | |
download | xine-lib-cf45a6df3ddbb900ca213cf300244cd017bc1d2c.tar.gz xine-lib-cf45a6df3ddbb900ca213cf300244cd017bc1d2c.tar.bz2 |
small bugfixes
CVS patchset: 1067
CVS date: 2001/11/18 13:44:53
Diffstat (limited to 'src/libw32dll/w32codec.c')
-rw-r--r-- | src/libw32dll/w32codec.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index e51b575a7..c8e218d66 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.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: w32codec.c,v 1.48 2001/11/18 03:53:24 guenter Exp $ + * $Id: w32codec.c,v 1.49 2001/11/18 13:44:53 miguelfreitas Exp $ * * routines for using w32 codecs * DirectShow support by Miguel Freitas (Nov/2001) @@ -565,7 +565,9 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { } else if (this->decoder_ok) { /* printf ("w32codec: processing packet ...\n"); */ - + if( (int) buf->size <= 0 ) + return; + if( this->size + buf->size > this->bufsize ) { this->bufsize = this->size + buf->size; printf("w32codec: increasing source buffer to %d to avoid overflow.\n", @@ -708,7 +710,8 @@ static void w32v_close (video_decoder_t *this_gen) { if ( !this->ds_driver ) { } else { - DS_VideoDecoder_Destroy(this->ds_dec); + if( this->ds_dec ) + DS_VideoDecoder_Destroy(this->ds_dec); } if ( this->img_buffer ) { @@ -1061,6 +1064,8 @@ static void w32a_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { this->decoder_ok = w32a_init_audio (this, (WAVEFORMATEX *)buf->content, buf->type); } else if (this->decoder_ok) { + if( (int)buf->size <= 0 ) + return; w32a_decode_audio (this, buf->content, buf->size, buf->decoder_info[0]==2, |