Originally committed as revision 20099 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -250,6 +250,8 @@ static int mpc8_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 250 | 250 |
while(!url_feof(s->pb)){
|
| 251 | 251 |
pos = url_ftell(s->pb); |
| 252 | 252 |
mpc8_get_chunk_header(s->pb, &tag, &size); |
| 253 |
+ if (size < 0) |
|
| 254 |
+ return -1; |
|
| 253 | 255 |
if(tag == TAG_AUDIOPACKET){
|
| 254 | 256 |
if(av_get_packet(s->pb, pkt, size) < 0) |
| 255 | 257 |
return AVERROR(ENOMEM); |