Revision 3e8c4f96 libavformat/avidec.c
libavformat/avidec.c | ||
---|---|---|
84 | 84 |
static int avi_load_index(AVFormatContext *s); |
85 | 85 |
static int guess_ni_flag(AVFormatContext *s); |
86 | 86 |
|
87 |
#ifdef DEBUG |
|
88 |
static void print_tag(const char *str, unsigned int tag, int size) |
|
89 |
{ |
|
90 |
dprintf(NULL, "%s: tag=%c%c%c%c size=0x%x\n", |
|
91 |
str, tag & 0xff, |
|
92 |
(tag >> 8) & 0xff, |
|
93 |
(tag >> 16) & 0xff, |
|
94 |
(tag >> 24) & 0xff, |
|
95 |
size); |
|
96 |
} |
|
97 |
#endif |
|
87 |
#define print_tag(str, tag, size) \ |
|
88 |
dprintf(NULL, "%s: tag=%c%c%c%c size=0x%x\n", \ |
|
89 |
str, tag & 0xff, \ |
|
90 |
(tag >> 8) & 0xff, \ |
|
91 |
(tag >> 16) & 0xff, \ |
|
92 |
(tag >> 24) & 0xff, \ |
|
93 |
size) |
|
98 | 94 |
|
99 | 95 |
static inline int get_duration(AVIStream *ast, int len){ |
100 | 96 |
if(ast->sample_size){ |
... | ... | |
369 | 365 |
goto fail; |
370 | 366 |
tag = get_le32(pb); |
371 | 367 |
size = get_le32(pb); |
372 |
#ifdef DEBUG |
|
368 |
|
|
373 | 369 |
print_tag("tag", tag, size); |
374 |
#endif |
|
375 | 370 |
|
376 | 371 |
switch(tag) { |
377 | 372 |
case MKTAG('L', 'I', 'S', 'T'): |
378 | 373 |
list_end = url_ftell(pb) + size; |
379 | 374 |
/* Ignored, except at start of video packets. */ |
380 | 375 |
tag1 = get_le32(pb); |
381 |
#ifdef DEBUG |
|
376 |
|
|
382 | 377 |
print_tag("list", tag1, 0); |
383 |
#endif |
|
378 |
|
|
384 | 379 |
if (tag1 == MKTAG('m', 'o', 'v', 'i')) { |
385 | 380 |
avi->movi_list = url_ftell(pb) - 4; |
386 | 381 |
if(size) avi->movi_end = avi->movi_list + size + (size & 1); |
... | ... | |
447 | 442 |
if(amv_file_format) |
448 | 443 |
tag1 = stream_index ? MKTAG('a','u','d','s') : MKTAG('v','i','d','s'); |
449 | 444 |
|
450 |
#ifdef DEBUG |
|
451 | 445 |
print_tag("strh", tag1, -1); |
452 |
#endif |
|
446 |
|
|
453 | 447 |
if(tag1 == MKTAG('i', 'a', 'v', 's') || tag1 == MKTAG('i', 'v', 'a', 's')){ |
454 | 448 |
int64_t dv_dur; |
455 | 449 |
|
... | ... | |
607 | 601 |
st->codec->palctrl->palette_changed = 1; |
608 | 602 |
} |
609 | 603 |
|
610 |
#ifdef DEBUG |
|
611 | 604 |
print_tag("video", tag1, 0); |
612 |
#endif |
|
605 |
|
|
613 | 606 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
614 | 607 |
st->codec->codec_tag = tag1; |
615 | 608 |
st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1); |
Also available in: Unified diff