Fix "invalid fragment" handling.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9443 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ranma 2003-02-16 01:23:10 +00:00
parent 6b9111a0d3
commit 3516fe861d
1 changed files with 1 additions and 0 deletions

View File

@ -506,6 +506,7 @@ void spudec_assemble(void *this, unsigned char *packet_bytes, unsigned int len,
if (last_packet->size < last_packet->offset + len){
mp_msg(MSGT_SPUDEC,MSGL_WARN,"SPUasm: invalid fragment\n");
last_packet->size = last_packet->offset = 0;
return;
} else {
memcpy(last_packet->data + last_packet->offset, packet_bytes, len);
last_packet->offset += len;