[FFmpeg-cvslog] r17491 - trunk/libavformat/avidec.c
michael
subversion
Sat Feb 21 21:11:34 CET 2009
Author: michael
Date: Sat Feb 21 21:11:34 2009
New Revision: 17491
Log:
Handle chunks with the MSB in size set correctly that is unsigned.
Modified:
trunk/libavformat/avidec.c
Modified: trunk/libavformat/avidec.c
==============================================================================
--- trunk/libavformat/avidec.c Sat Feb 21 21:03:05 2009 (r17490)
+++ trunk/libavformat/avidec.c Sat Feb 21 21:11:34 2009 (r17491)
@@ -643,12 +643,13 @@ static int avi_read_packet(AVFormatConte
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = s->pb;
- int n, d[8], size;
+ int n, d[8];
+ unsigned int size;
int64_t i, sync;
void* dstr;
if (CONFIG_DV_DEMUXER && avi->dv_demux) {
- size = dv_get_packet(avi->dv_demux, pkt);
+ int size = dv_get_packet(avi->dv_demux, pkt);
if (size >= 0)
return size;
}
@@ -788,7 +789,7 @@ resync:
n= get_stream_idx(d+2);
//av_log(s, AV_LOG_DEBUG, "%X %X %X %X %X %X %X %X %"PRId64" %d %d\n", d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
- if(i + size > avi->fsize || d[0]<0)
+ if(i + (uint64_t)size > avi->fsize || d[0]<0)
continue;
//parse ix##
More information about the ffmpeg-cvslog
mailing list