Mercurial > libavformat.hg
comparison mov.c @ 146:b9703b3c10b6 libavformat
* 3gp patch by Joca
author | kabi |
---|---|
date | Thu, 05 Jun 2003 14:30:52 +0000 |
parents | 6b74809d2496 |
children | 2f924727fd96 |
comparison
equal
deleted
inserted
replaced
145:4f3960430e54 | 146:b9703b3c10b6 |
---|---|
1328 case MKTAG( 'm', 'o', 'o', 'v' ): | 1328 case MKTAG( 'm', 'o', 'o', 'v' ): |
1329 case MKTAG( 'w', 'i', 'd', 'e' ): | 1329 case MKTAG( 'w', 'i', 'd', 'e' ): |
1330 case MKTAG( 'f', 'r', 'e', 'e' ): | 1330 case MKTAG( 'f', 'r', 'e', 'e' ): |
1331 case MKTAG( 'm', 'd', 'a', 't' ): | 1331 case MKTAG( 'm', 'd', 'a', 't' ): |
1332 case MKTAG( 'p', 'n', 'o', 't' ): /* detect movs with preview pics like ew.mov and april.mov */ | 1332 case MKTAG( 'p', 'n', 'o', 't' ): /* detect movs with preview pics like ew.mov and april.mov */ |
1333 case MKTAG( 'u', 'd', 't', 'a' ): /* Packet Video PVAuthor adds this and a lot of more junk */ | |
1333 return AVPROBE_SCORE_MAX; | 1334 return AVPROBE_SCORE_MAX; |
1334 case MKTAG( 'f', 't', 'y', 'p' ): | 1335 case MKTAG( 'f', 't', 'y', 'p' ): |
1335 case MKTAG( 's', 'k', 'i', 'p' ): | 1336 case MKTAG( 's', 'k', 'i', 'p' ): |
1336 offset = to_be32(p->buf) + offset; | 1337 offset = to_be32(p->buf) + offset; |
1337 break; | 1338 break; |
1484 MOVStreamContext *msc = mov->streams[i]; | 1485 MOVStreamContext *msc = mov->streams[i]; |
1485 if ((msc->next_chunk < msc->chunk_count) | 1486 if ((msc->next_chunk < msc->chunk_count) |
1486 && ((msc->chunk_offsets[msc->next_chunk] - offset) < size)) | 1487 && ((msc->chunk_offsets[msc->next_chunk] - offset) < size)) |
1487 size = msc->chunk_offsets[msc->next_chunk] - offset; | 1488 size = msc->chunk_offsets[msc->next_chunk] - offset; |
1488 } | 1489 } |
1490 | |
1491 #ifdef MOV_MINOLTA_FIX | |
1492 //Make sure that size is according to sample_size (Needed by .mov files | |
1493 //created on a Minolta Dimage Xi where audio chunks contains waste data in the end) | |
1494 //Maybe we should really not only check sc->sample_size, but also sc->sample_sizes | |
1495 //but I have no such movies | |
1496 if (sc->sample_size > 0) { | |
1497 int foundsize=0; | |
1498 for(i=0; i<(sc->sample_to_chunk_sz); i++) { | |
1499 if( (sc->sample_to_chunk[i].first)<=(sc->next_chunk) && (sc->sample_size>0) ) | |
1500 { | |
1501 foundsize=sc->sample_to_chunk[i].count*sc->sample_size; | |
1502 } | |
1503 #ifdef DEBUG | |
1504 /*printf("sample_to_chunk first=%ld count=%ld, id=%ld\n", sc->sample_to_chunk[i].first, sc->sample_to_chunk[i].count, sc->sample_to_chunk[i].id);*/ | |
1505 #endif | |
1506 } | |
1507 if( (foundsize>0) && (foundsize<size) ) | |
1508 { | |
1509 #ifdef DEBUG | |
1510 /*printf("this size should actually be %d\n",foundsize);*/ | |
1511 #endif | |
1512 size=foundsize; | |
1513 } | |
1514 } | |
1515 #endif //MOV_MINOLTA_FIX | |
1516 | |
1489 #ifdef MOV_SPLIT_CHUNKS | 1517 #ifdef MOV_SPLIT_CHUNKS |
1490 /* split chunks into samples */ | 1518 /* split chunks into samples */ |
1491 if (sc->sample_size == 0) { | 1519 if (sc->sample_size == 0) { |
1492 int idx = sc->sample_to_chunk_index; | 1520 int idx = sc->sample_to_chunk_index; |
1493 if ((idx + 1 < sc->sample_to_chunk_sz) | 1521 if ((idx + 1 < sc->sample_to_chunk_sz) |