comparison matroskadec.c @ 3648:07f046bf6849 libavformat

matroskadec: move declaration to upper block
author aurel
date Tue, 05 Aug 2008 00:40:49 +0000
parents 98eb4eb368fa
children 71da9d010bae
comparison
equal deleted inserted replaced
3647:98eb4eb368fa 3648:07f046bf6849
1510 static int 1510 static int
1511 matroska_read_header (AVFormatContext *s, 1511 matroska_read_header (AVFormatContext *s,
1512 AVFormatParameters *ap) 1512 AVFormatParameters *ap)
1513 { 1513 {
1514 MatroskaDemuxContext *matroska = s->priv_data; 1514 MatroskaDemuxContext *matroska = s->priv_data;
1515 MatroskaTrack *tracks;
1515 EbmlList *index_list; 1516 EbmlList *index_list;
1516 MatroskaIndex *index; 1517 MatroskaIndex *index;
1517 int i, j, last_level, res = 0; 1518 int i, j, last_level, res = 0;
1518 Ebml ebml = { 0 }; 1519 Ebml ebml = { 0 };
1520 AVStream *st;
1519 uint32_t id; 1521 uint32_t id;
1520 1522
1521 matroska->ctx = s; 1523 matroska->ctx = s;
1522 1524
1523 /* First read the EBML header. */ 1525 /* First read the EBML header. */
1640 /* Have we found a cluster? */ 1642 /* Have we found a cluster? */
1641 if (ebml_peek_id(matroska, NULL) != MATROSKA_ID_CLUSTER) 1643 if (ebml_peek_id(matroska, NULL) != MATROSKA_ID_CLUSTER)
1642 return -1; 1644 return -1;
1643 1645
1644 { 1646 {
1645 MatroskaTrack *tracks = matroska->tracks.elem; 1647 tracks = matroska->tracks.elem;
1646 int i, j;
1647 AVStream *st;
1648
1649 for (i=0; i < matroska->tracks.nb_elem; i++) { 1648 for (i=0; i < matroska->tracks.nb_elem; i++) {
1650 MatroskaTrack *track = &tracks[i]; 1649 MatroskaTrack *track = &tracks[i];
1651 enum CodecID codec_id = CODEC_ID_NONE; 1650 enum CodecID codec_id = CODEC_ID_NONE;
1652 uint8_t *extradata = NULL; 1651 uint8_t *extradata = NULL;
1653 int extradata_size = 0; 1652 int extradata_size = 0;