comparison nsvdec.c @ 2771:d52c718e83f9 libavformat

Use dynamically allocated ByteIOContext in AVFormatContext patch by: Bj«Órn Axelsson, bjorn d axelsson a intinor d se thread: [PATCH] Remove static ByteIOContexts, 06 nov 2007
author andoma
date Wed, 21 Nov 2007 07:41:00 +0000
parents 069fc63f8bc6
children 19bd4caf27a9
comparison
equal deleted inserted replaced
2770:a7e42cf4b364 2771:d52c718e83f9
226 226
227 /* try to find something we recognize, and set the state accordingly */ 227 /* try to find something we recognize, and set the state accordingly */
228 static int nsv_resync(AVFormatContext *s) 228 static int nsv_resync(AVFormatContext *s)
229 { 229 {
230 NSVContext *nsv = s->priv_data; 230 NSVContext *nsv = s->priv_data;
231 ByteIOContext *pb = &s->pb; 231 ByteIOContext *pb = s->pb;
232 uint32_t v = 0; 232 uint32_t v = 0;
233 int i; 233 int i;
234 234
235 PRINT(("%s(), offset = %"PRId64", state = %d\n", __FUNCTION__, url_ftell(pb), nsv->state)); 235 PRINT(("%s(), offset = %"PRId64", state = %d\n", __FUNCTION__, url_ftell(pb), nsv->state));
236 236
273 } 273 }
274 274
275 static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap) 275 static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
276 { 276 {
277 NSVContext *nsv = s->priv_data; 277 NSVContext *nsv = s->priv_data;
278 ByteIOContext *pb = &s->pb; 278 ByteIOContext *pb = s->pb;
279 unsigned int file_size, size; 279 unsigned int file_size, size;
280 int64_t duration; 280 int64_t duration;
281 int strings_size; 281 int strings_size;
282 int table_entries; 282 int table_entries;
283 int table_entries_used; 283 int table_entries_used;
392 } 392 }
393 393
394 static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) 394 static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
395 { 395 {
396 NSVContext *nsv = s->priv_data; 396 NSVContext *nsv = s->priv_data;
397 ByteIOContext *pb = &s->pb; 397 ByteIOContext *pb = s->pb;
398 uint32_t vtag, atag; 398 uint32_t vtag, atag;
399 uint16_t vwidth, vheight; 399 uint16_t vwidth, vheight;
400 AVRational framerate; 400 AVRational framerate;
401 int i; 401 int i;
402 AVStream *st; 402 AVStream *st;
531 } 531 }
532 532
533 static int nsv_read_chunk(AVFormatContext *s, int fill_header) 533 static int nsv_read_chunk(AVFormatContext *s, int fill_header)
534 { 534 {
535 NSVContext *nsv = s->priv_data; 535 NSVContext *nsv = s->priv_data;
536 ByteIOContext *pb = &s->pb; 536 ByteIOContext *pb = s->pb;
537 AVStream *st[2] = {NULL, NULL}; 537 AVStream *st[2] = {NULL, NULL};
538 NSVStream *nst; 538 NSVStream *nst;
539 AVPacket *pkt; 539 AVPacket *pkt;
540 int i, err = 0; 540 int i, err = 0;
541 uint8_t auxcount; /* number of aux metadata, also 4 bits of vsize */ 541 uint8_t auxcount; /* number of aux metadata, also 4 bits of vsize */