|
|
@ -138,7 +138,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){ |
|
|
|
AVIStream *ast; |
|
|
|
AVIStream *ast; |
|
|
|
int i; |
|
|
|
int i; |
|
|
|
int64_t last_pos= -1; |
|
|
|
int64_t last_pos= -1; |
|
|
|
int64_t filesize= url_fsize(s->pb); |
|
|
|
int64_t filesize= avio_size(s->pb); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_SEEK |
|
|
|
#ifdef DEBUG_SEEK |
|
|
|
av_log(s, AV_LOG_ERROR, "longs_pre_entry:%d index_type:%d entries_in_use:%d chunk_id:%X base:%16"PRIX64"\n", |
|
|
|
av_log(s, AV_LOG_ERROR, "longs_pre_entry:%d index_type:%d entries_in_use:%d chunk_id:%X base:%16"PRIX64"\n", |
|
|
@ -351,7 +351,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) |
|
|
|
if (get_riff(s, pb) < 0) |
|
|
|
if (get_riff(s, pb) < 0) |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
avi->fsize = url_fsize(pb); |
|
|
|
avi->fsize = avio_size(pb); |
|
|
|
if(avi->fsize<=0) |
|
|
|
if(avi->fsize<=0) |
|
|
|
avi->fsize= avi->riff_end == 8 ? INT64_MAX : avi->riff_end; |
|
|
|
avi->fsize= avi->riff_end == 8 ? INT64_MAX : avi->riff_end; |
|
|
|
|
|
|
|
|
|
|
@ -378,7 +378,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) |
|
|
|
if (tag1 == MKTAG('m', 'o', 'v', 'i')) { |
|
|
|
if (tag1 == MKTAG('m', 'o', 'v', 'i')) { |
|
|
|
avi->movi_list = avio_tell(pb) - 4; |
|
|
|
avi->movi_list = avio_tell(pb) - 4; |
|
|
|
if(size) avi->movi_end = avi->movi_list + size + (size & 1); |
|
|
|
if(size) avi->movi_end = avi->movi_list + size + (size & 1); |
|
|
|
else avi->movi_end = url_fsize(pb); |
|
|
|
else avi->movi_end = avio_size(pb); |
|
|
|
av_dlog(NULL, "movi end=%"PRIx64"\n", avi->movi_end); |
|
|
|
av_dlog(NULL, "movi end=%"PRIx64"\n", avi->movi_end); |
|
|
|
goto end_of_header; |
|
|
|
goto end_of_header; |
|
|
|
} |
|
|
|
} |
|
|
@ -705,7 +705,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) |
|
|
|
av_log(s, AV_LOG_ERROR, "Something went wrong during header parsing, " |
|
|
|
av_log(s, AV_LOG_ERROR, "Something went wrong during header parsing, " |
|
|
|
"I will ignore it and try to continue anyway.\n"); |
|
|
|
"I will ignore it and try to continue anyway.\n"); |
|
|
|
avi->movi_list = avio_tell(pb) - 4; |
|
|
|
avi->movi_list = avio_tell(pb) - 4; |
|
|
|
avi->movi_end = url_fsize(pb); |
|
|
|
avi->movi_end = avio_size(pb); |
|
|
|
goto end_of_header; |
|
|
|
goto end_of_header; |
|
|
|
} |
|
|
|
} |
|
|
|
/* skip tag */ |
|
|
|
/* skip tag */ |
|
|
|