|
|
@ -117,8 +117,8 @@ static const AVMetadataConv avi_metadata_conv[] = { |
|
|
|
static int avi_load_index(AVFormatContext *s); |
|
|
|
static int avi_load_index(AVFormatContext *s); |
|
|
|
static int guess_ni_flag(AVFormatContext *s); |
|
|
|
static int guess_ni_flag(AVFormatContext *s); |
|
|
|
|
|
|
|
|
|
|
|
#define print_tag(str, tag, size) \ |
|
|
|
#define print_tag(s, str, tag, size) \ |
|
|
|
av_log(NULL, AV_LOG_TRACE, "pos:%"PRIX64" %s: tag=%s size=0x%x\n", \
|
|
|
|
av_log(s, AV_LOG_TRACE, "pos:%"PRIX64" %s: tag=%s size=0x%x\n", \
|
|
|
|
avio_tell(pb), str, av_fourcc2str(tag), size) \
|
|
|
|
avio_tell(pb), str, av_fourcc2str(tag), size) \
|
|
|
|
|
|
|
|
|
|
|
|
static inline int get_duration(AVIStream *ast, int len) |
|
|
|
static inline int get_duration(AVIStream *ast, int len) |
|
|
@ -504,7 +504,7 @@ static int avi_read_header(AVFormatContext *s) |
|
|
|
tag = avio_rl32(pb); |
|
|
|
tag = avio_rl32(pb); |
|
|
|
size = avio_rl32(pb); |
|
|
|
size = avio_rl32(pb); |
|
|
|
|
|
|
|
|
|
|
|
print_tag("tag", tag, size); |
|
|
|
print_tag(s, "tag", tag, size); |
|
|
|
|
|
|
|
|
|
|
|
switch (tag) { |
|
|
|
switch (tag) { |
|
|
|
case MKTAG('L', 'I', 'S', 'T'): |
|
|
|
case MKTAG('L', 'I', 'S', 'T'): |
|
|
@ -512,7 +512,7 @@ static int avi_read_header(AVFormatContext *s) |
|
|
|
/* Ignored, except at start of video packets. */ |
|
|
|
/* Ignored, except at start of video packets. */ |
|
|
|
tag1 = avio_rl32(pb); |
|
|
|
tag1 = avio_rl32(pb); |
|
|
|
|
|
|
|
|
|
|
|
print_tag("list", tag1, 0); |
|
|
|
print_tag(s, "list", tag1, 0); |
|
|
|
|
|
|
|
|
|
|
|
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; |
|
|
@ -520,7 +520,7 @@ static int avi_read_header(AVFormatContext *s) |
|
|
|
avi->movi_end = avi->movi_list + size + (size & 1); |
|
|
|
avi->movi_end = avi->movi_list + size + (size & 1); |
|
|
|
else |
|
|
|
else |
|
|
|
avi->movi_end = avi->fsize; |
|
|
|
avi->movi_end = avi->fsize; |
|
|
|
av_log(NULL, AV_LOG_TRACE, "movi end=%"PRIx64"\n", avi->movi_end); |
|
|
|
av_log(s, AV_LOG_TRACE, "movi end=%"PRIx64"\n", avi->movi_end); |
|
|
|
goto end_of_header; |
|
|
|
goto end_of_header; |
|
|
|
} else if (tag1 == MKTAG('I', 'N', 'F', 'O')) |
|
|
|
} else if (tag1 == MKTAG('I', 'N', 'F', 'O')) |
|
|
|
ff_read_riff_info(s, size - 4); |
|
|
|
ff_read_riff_info(s, size - 4); |
|
|
@ -584,7 +584,7 @@ static int avi_read_header(AVFormatContext *s) |
|
|
|
tag1 = stream_index ? MKTAG('a', 'u', 'd', 's') |
|
|
|
tag1 = stream_index ? MKTAG('a', 'u', 'd', 's') |
|
|
|
: MKTAG('v', 'i', 'd', 's'); |
|
|
|
: MKTAG('v', 'i', 'd', 's'); |
|
|
|
|
|
|
|
|
|
|
|
print_tag("strh", tag1, -1); |
|
|
|
print_tag(s, "strh", tag1, -1); |
|
|
|
|
|
|
|
|
|
|
|
if (tag1 == MKTAG('i', 'a', 'v', 's') || |
|
|
|
if (tag1 == MKTAG('i', 'a', 'v', 's') || |
|
|
|
tag1 == MKTAG('i', 'v', 'a', 's')) { |
|
|
|
tag1 == MKTAG('i', 'v', 'a', 's')) { |
|
|
@ -802,7 +802,7 @@ FF_ENABLE_DEPRECATION_WARNINGS |
|
|
|
ast->has_pal = 1; |
|
|
|
ast->has_pal = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
print_tag("video", tag1, 0); |
|
|
|
print_tag(s, "video", tag1, 0); |
|
|
|
|
|
|
|
|
|
|
|
st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; |
|
|
|
st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; |
|
|
|
st->codecpar->codec_tag = tag1; |
|
|
|
st->codecpar->codec_tag = tag1; |
|
|
|