libavformat/nsvdec.c:359: error: Null Dereference
  pointer `nsv->nsvs_file_offset` last assigned on line 356 could be null and is dereferenced at line 359, column 13.

libavformat/nsvdec.c:278:1: start of procedure nsv_parse_NSVf_header()
276. }
277. 
278. static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
     ^
279. {
280.     NSVContext *nsv = s->priv_data;

libavformat/nsvdec.c:280:5: 
278. static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
279. {
280.     NSVContext *nsv = s->priv_data;
         ^
281.     ByteIOContext *pb = s->pb;
282.     unsigned int file_size, size;

libavformat/nsvdec.c:281:5: 
279. {
280.     NSVContext *nsv = s->priv_data;
281.     ByteIOContext *pb = s->pb;
         ^
282.     unsigned int file_size, size;
283.     int64_t duration;

libavformat/nsvdec.c:290:5: 
288.     PRINT(("%s()\n", __FUNCTION__));
289. 
290.     nsv->state = NSV_UNSYNC; /* in case we fail */
         ^
291. 
292.     size = get_le32(pb);

libavformat/nsvdec.c:292:5: 
290.     nsv->state = NSV_UNSYNC; /* in case we fail */
291. 
292.     size = get_le32(pb);
         ^
293.     if (size < 28)
294.         return -1;

libavformat/aviobuf.c:456:1: start of procedure get_le32()
  454. }
  455. 
  456. unsigned int get_le32(ByteIOContext *s)
       ^
  457. {
  458.     unsigned int val;

libavformat/aviobuf.c:459:5: 
  457. {
  458.     unsigned int val;
  459.     val = get_le16(s);
           ^
  460.     val |= get_le16(s) << 16;
  461.     return val;

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:460:5: 
  458.     unsigned int val;
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
           ^
  461.     return val;
  462. }

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:461:5: 
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
  461.     return val;
           ^
  462. }
  463. 

libavformat/aviobuf.c:462:1: return from a call to get_le32
  460.     val |= get_le16(s) << 16;
  461.     return val;
  462. }
       ^
  463. 
  464. uint64_t get_le64(ByteIOContext *s)

libavformat/nsvdec.c:293:9: Taking false branch
291. 
292.     size = get_le32(pb);
293.     if (size < 28)
             ^
294.         return -1;
295.     nsv->NSVf_end = size;

libavformat/nsvdec.c:295:5: 
293.     if (size < 28)
294.         return -1;
295.     nsv->NSVf_end = size;
         ^
296. 
297.     //s->file_size = (uint32_t)get_le32(pb);

libavformat/nsvdec.c:298:5: 
296. 
297.     //s->file_size = (uint32_t)get_le32(pb);
298.     file_size = (uint32_t)get_le32(pb);
         ^
299.     PRINT(("NSV NSVf chunk_size %u\n", size));
300.     PRINT(("NSV NSVf file_size %u\n", file_size));

libavformat/aviobuf.c:456:1: start of procedure get_le32()
  454. }
  455. 
  456. unsigned int get_le32(ByteIOContext *s)
       ^
  457. {
  458.     unsigned int val;

libavformat/aviobuf.c:459:5: 
  457. {
  458.     unsigned int val;
  459.     val = get_le16(s);
           ^
  460.     val |= get_le16(s) << 16;
  461.     return val;

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:460:5: 
  458.     unsigned int val;
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
           ^
  461.     return val;
  462. }

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:461:5: 
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
  461.     return val;
           ^
  462. }
  463. 

libavformat/aviobuf.c:462:1: return from a call to get_le32
  460.     val |= get_le16(s) << 16;
  461.     return val;
  462. }
       ^
  463. 
  464. uint64_t get_le64(ByteIOContext *s)

libavformat/nsvdec.c:302:5: 
300.     PRINT(("NSV NSVf file_size %u\n", file_size));
301. 
302.     nsv->duration = duration = get_le32(pb); /* in ms */
         ^
303.     PRINT(("NSV NSVf duration %"PRId64" ms\n", duration));
304.     // XXX: store it in AVStreams

libavformat/aviobuf.c:456:1: start of procedure get_le32()
  454. }
  455. 
  456. unsigned int get_le32(ByteIOContext *s)
       ^
  457. {
  458.     unsigned int val;

libavformat/aviobuf.c:459:5: 
  457. {
  458.     unsigned int val;
  459.     val = get_le16(s);
           ^
  460.     val |= get_le16(s) << 16;
  461.     return val;

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:460:5: 
  458.     unsigned int val;
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
           ^
  461.     return val;
  462. }

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:461:5: 
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
  461.     return val;
           ^
  462. }
  463. 

libavformat/aviobuf.c:462:1: return from a call to get_le32
  460.     val |= get_le16(s) << 16;
  461.     return val;
  462. }
       ^
  463. 
  464. uint64_t get_le64(ByteIOContext *s)

libavformat/nsvdec.c:306:5: 
304.     // XXX: store it in AVStreams
305. 
306.     strings_size = get_le32(pb);
         ^
307.     table_entries = get_le32(pb);
308.     table_entries_used = get_le32(pb);

libavformat/aviobuf.c:456:1: start of procedure get_le32()
  454. }
  455. 
  456. unsigned int get_le32(ByteIOContext *s)
       ^
  457. {
  458.     unsigned int val;

libavformat/aviobuf.c:459:5: 
  457. {
  458.     unsigned int val;
  459.     val = get_le16(s);
           ^
  460.     val |= get_le16(s) << 16;
  461.     return val;

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:460:5: 
  458.     unsigned int val;
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
           ^
  461.     return val;
  462. }

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:461:5: 
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
  461.     return val;
           ^
  462. }
  463. 

libavformat/aviobuf.c:462:1: return from a call to get_le32
  460.     val |= get_le16(s) << 16;
  461.     return val;
  462. }
       ^
  463. 
  464. uint64_t get_le64(ByteIOContext *s)

libavformat/nsvdec.c:307:5: 
305. 
306.     strings_size = get_le32(pb);
307.     table_entries = get_le32(pb);
         ^
308.     table_entries_used = get_le32(pb);
309.     PRINT(("NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",

libavformat/aviobuf.c:456:1: start of procedure get_le32()
  454. }
  455. 
  456. unsigned int get_le32(ByteIOContext *s)
       ^
  457. {
  458.     unsigned int val;

libavformat/aviobuf.c:459:5: 
  457. {
  458.     unsigned int val;
  459.     val = get_le16(s);
           ^
  460.     val |= get_le16(s) << 16;
  461.     return val;

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:460:5: 
  458.     unsigned int val;
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
           ^
  461.     return val;
  462. }

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:461:5: 
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
  461.     return val;
           ^
  462. }
  463. 

libavformat/aviobuf.c:462:1: return from a call to get_le32
  460.     val |= get_le16(s) << 16;
  461.     return val;
  462. }
       ^
  463. 
  464. uint64_t get_le64(ByteIOContext *s)

libavformat/nsvdec.c:308:5: 
306.     strings_size = get_le32(pb);
307.     table_entries = get_le32(pb);
308.     table_entries_used = get_le32(pb);
         ^
309.     PRINT(("NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",
310.             strings_size, table_entries, table_entries_used));

libavformat/aviobuf.c:456:1: start of procedure get_le32()
  454. }
  455. 
  456. unsigned int get_le32(ByteIOContext *s)
       ^
  457. {
  458.     unsigned int val;

libavformat/aviobuf.c:459:5: 
  457. {
  458.     unsigned int val;
  459.     val = get_le16(s);
           ^
  460.     val |= get_le16(s) << 16;
  461.     return val;

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:460:5: 
  458.     unsigned int val;
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
           ^
  461.     return val;
  462. }

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:461:5: 
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
  461.     return val;
           ^
  462. }
  463. 

libavformat/aviobuf.c:462:1: return from a call to get_le32
  460.     val |= get_le16(s) << 16;
  461.     return val;
  462. }
       ^
  463. 
  464. uint64_t get_le64(ByteIOContext *s)

libavformat/nsvdec.c:311:9: 
309.     PRINT(("NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",
310.             strings_size, table_entries, table_entries_used));
311.     if (url_feof(pb))
             ^
312.         return -1;
313. 

libavformat/aviobuf.c:210:1: start of procedure url_feof()
  208. }
  209. 
  210. int url_feof(ByteIOContext *s)
       ^
  211. {
  212.     if(!s)

libavformat/aviobuf.c:212:9: Taking false branch
  210. int url_feof(ByteIOContext *s)
  211. {
  212.     if(!s)
               ^
  213.         return 0;
  214.     return s->eof_reached;

libavformat/aviobuf.c:214:5: 
  212.     if(!s)
  213.         return 0;
  214.     return s->eof_reached;
           ^
  215. }
  216. 

libavformat/aviobuf.c:215:1: return from a call to url_feof
  213.         return 0;
  214.     return s->eof_reached;
  215. }
       ^
  216. 
  217. int url_ferror(ByteIOContext *s)

libavformat/nsvdec.c:311:9: Taking false branch
309.     PRINT(("NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",
310.             strings_size, table_entries, table_entries_used));
311.     if (url_feof(pb))
             ^
312.         return -1;
313. 

libavformat/nsvdec.c:316:9: Taking false branch
314.     PRINT(("NSV got header; filepos %"PRId64"\n", url_ftell(pb)));
315. 
316.     if (strings_size > 0) {
             ^
317.         char *strings; /* last byte will be '\0' to play safe with str*() */
318.         char *p, *endp;

libavformat/nsvdec.c:346:9: 
344.         av_free(strings);
345.     }
346.     if (url_feof(pb))
             ^
347.         return -1;
348. 

libavformat/aviobuf.c:210:1: start of procedure url_feof()
  208. }
  209. 
  210. int url_feof(ByteIOContext *s)
       ^
  211. {
  212.     if(!s)

libavformat/aviobuf.c:212:9: Taking false branch
  210. int url_feof(ByteIOContext *s)
  211. {
  212.     if(!s)
               ^
  213.         return 0;
  214.     return s->eof_reached;

libavformat/aviobuf.c:214:5: 
  212.     if(!s)
  213.         return 0;
  214.     return s->eof_reached;
           ^
  215. }
  216. 

libavformat/aviobuf.c:215:1: return from a call to url_feof
  213.         return 0;
  214.     return s->eof_reached;
  215. }
       ^
  216. 
  217. int url_ferror(ByteIOContext *s)

libavformat/nsvdec.c:346:9: Taking false branch
344.         av_free(strings);
345.     }
346.     if (url_feof(pb))
             ^
347.         return -1;
348. 

libavformat/nsvdec.c:351:9: Taking true branch
349.     PRINT(("NSV got infos; filepos %"PRId64"\n", url_ftell(pb)));
350. 
351.     if (table_entries_used > 0) {
             ^
352.         int i;
353.         nsv->index_entries = table_entries_used;

libavformat/nsvdec.c:353:9: 
351.     if (table_entries_used > 0) {
352.         int i;
353.         nsv->index_entries = table_entries_used;
             ^
354.         if((unsigned)table_entries_used >= UINT_MAX / sizeof(uint32_t))
355.             return -1;

libavformat/nsvdec.c:354:12: Taking false branch
352.         int i;
353.         nsv->index_entries = table_entries_used;
354.         if((unsigned)table_entries_used >= UINT_MAX / sizeof(uint32_t))
                ^
355.             return -1;
356.         nsv->nsvs_file_offset = av_malloc((unsigned)table_entries_used * sizeof(uint32_t));

libavformat/nsvdec.c:356:9: 
354.         if((unsigned)table_entries_used >= UINT_MAX / sizeof(uint32_t))
355.             return -1;
356.         nsv->nsvs_file_offset = av_malloc((unsigned)table_entries_used * sizeof(uint32_t));
             ^
357. 
358.         for(i=0;i<table_entries_used;i++)

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking true branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:56:9: 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
  56.         return NULL;
              ^
  57. 
  58. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

libavformat/nsvdec.c:358:13: 
356.         nsv->nsvs_file_offset = av_malloc((unsigned)table_entries_used * sizeof(uint32_t));
357. 
358.         for(i=0;i<table_entries_used;i++)
                 ^
359.             nsv->nsvs_file_offset[i] = get_le32(pb) + size;
360. 

libavformat/nsvdec.c:358:17: Loop condition is true. Entering loop body
356.         nsv->nsvs_file_offset = av_malloc((unsigned)table_entries_used * sizeof(uint32_t));
357. 
358.         for(i=0;i<table_entries_used;i++)
                     ^
359.             nsv->nsvs_file_offset[i] = get_le32(pb) + size;
360. 

libavformat/nsvdec.c:359:13: 
357. 
358.         for(i=0;i<table_entries_used;i++)
359.             nsv->nsvs_file_offset[i] = get_le32(pb) + size;
                 ^
360. 
361.         if(table_entries > table_entries_used &&

libavformat/aviobuf.c:456:1: start of procedure get_le32()
  454. }
  455. 
  456. unsigned int get_le32(ByteIOContext *s)
       ^
  457. {
  458.     unsigned int val;

libavformat/aviobuf.c:459:5: 
  457. {
  458.     unsigned int val;
  459.     val = get_le16(s);
           ^
  460.     val |= get_le16(s) << 16;
  461.     return val;

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:460:5: 
  458.     unsigned int val;
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
           ^
  461.     return val;
  462. }

libavformat/aviobuf.c:440:1: start of procedure get_le16()
    438. }
    439. 
    440. unsigned int get_le16(ByteIOContext *s)
         ^
    441. {
    442.     unsigned int val;

libavformat/aviobuf.c:443:5: 
    441. {
    442.     unsigned int val;
    443.     val = get_byte(s);
             ^
    444.     val |= get_byte(s) << 8;
    445.     return val;

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:444:5: 
    442.     unsigned int val;
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
             ^
    445.     return val;
    446. }

libavformat/aviobuf.c:352:1: start of procedure get_byte()
      350. 
      351. /* XXX: put an inline version */
      352. int get_byte(ByteIOContext *s)
           ^
      353. {
      354.     if (s->buf_ptr < s->buf_end) {

libavformat/aviobuf.c:354:9: Taking true branch
      352. int get_byte(ByteIOContext *s)
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
                   ^
      355.         return *s->buf_ptr++;
      356.     } else {

libavformat/aviobuf.c:355:9: 
      353. {
      354.     if (s->buf_ptr < s->buf_end) {
      355.         return *s->buf_ptr++;
                   ^
      356.     } else {
      357.         fill_buffer(s);

libavformat/aviobuf.c:363:1: return from a call to get_byte
      361.             return 0;
      362.     }
      363. }
           ^
      364. 
      365. int url_fgetc(ByteIOContext *s)

libavformat/aviobuf.c:445:5: 
    443.     val = get_byte(s);
    444.     val |= get_byte(s) << 8;
    445.     return val;
             ^
    446. }
    447. 

libavformat/aviobuf.c:446:1: return from a call to get_le16
    444.     val |= get_byte(s) << 8;
    445.     return val;
    446. }
         ^
    447. 
    448. unsigned int get_le24(ByteIOContext *s)

libavformat/aviobuf.c:461:5: 
  459.     val = get_le16(s);
  460.     val |= get_le16(s) << 16;
  461.     return val;
           ^
  462. }
  463. 

libavformat/aviobuf.c:462:1: return from a call to get_le32
  460.     val |= get_le16(s) << 16;
  461.     return val;
  462. }
       ^
  463. 
  464. uint64_t get_le64(ByteIOContext *s)

static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
{
    NSVContext *nsv = s->priv_data;
    ByteIOContext *pb = s->pb;
    unsigned int file_size, size;
    int64_t duration;
    int strings_size;
    int table_entries;
    int table_entries_used;
    PRINT(("%s()\n", __FUNCTION__));
    nsv->state = NSV_UNSYNC;
    size = get_le32(pb);
    if (size < 28)
        return -1;
    nsv->NSVf_end = size;
    file_size = (uint32_t)get_le32(pb);
    PRINT(("NSV NSVf chunk_size %u\n", size));
    PRINT(("NSV NSVf file_size %u\n", file_size));
    nsv->duration = duration = get_le32(pb);
    PRINT(("NSV NSVf duration %"PRId64" ms\n", duration));
    strings_size = get_le32(pb);
    table_entries = get_le32(pb);
    table_entries_used = get_le32(pb);
    PRINT(("NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",
            strings_size, table_entries, table_entries_used));
    if (url_feof(pb))
        return -1;
    PRINT(("NSV got header; filepos %"PRId64"\n", url_ftell(pb)));
    if (strings_size > 0) {
        char *strings;
        char *p, *endp;
        char *token, *value;
        char quote;
        p = strings = av_mallocz(strings_size + 1);
        endp = strings + strings_size;
        get_buffer(pb, strings, strings_size);
        while (p < endp) {
            while (*p == ' ')
                p++;
            if (p >= endp-2)
                break;
            token = p;
            p = strchr(p, '=');
            if (!p || p >= endp-2)
                break;
            *p++ = '\0';
            quote = *p++;
            value = p;
            p = strchr(p, quote);
            if (!p || p >= endp)
                break;
            *p++ = '\0';
            PRINT(("NSV NSVf INFO: %s='%s'\n", token, value));
            av_metadata_set(&s->metadata, token, value);
        }
        av_free(strings);
    }
    if (url_feof(pb))
        return -1;
    PRINT(("NSV got infos; filepos %"PRId64"\n", url_ftell(pb)));
    if (table_entries_used > 0) {
        int i;
        nsv->index_entries = table_entries_used;
        if((unsigned)table_entries_used >= UINT_MAX / sizeof(uint32_t))
            return -1;
        nsv->nsvs_file_offset = av_malloc((unsigned)table_entries_used * sizeof(uint32_t));
        for(i=0;i<table_entries_used;i++)
            nsv->nsvs_file_offset[i] = get_le32(pb) + size;
        if(table_entries > table_entries_used &&
           get_le32(pb) == MKTAG('T','O','C','2')) {
            nsv->nsvs_timestamps = av_malloc((unsigned)table_entries_used*sizeof(uint32_t));
            for(i=0;i<table_entries_used;i++) {
                nsv->nsvs_timestamps[i] = get_le32(pb);
            }
        }
    }
    PRINT(("NSV got index; filepos %"PRId64"\n", url_ftell(pb)));
#ifdef DEBUG_DUMP_INDEX
#define V(v) ((v<0x20 || v > 127)?'.':v)
    PRINT(("NSV %d INDEX ENTRIES:\n", table_entries));
    PRINT(("NSV [dataoffset][fileoffset]\n", table_entries));
    for (i = 0; i < table_entries; i++) {
        unsigned char b[8];
        url_fseek(pb, size + nsv->nsvs_file_offset[i], SEEK_SET);
        get_buffer(pb, b, 8);
        PRINT(("NSV [0x%08lx][0x%08lx]: %02x %02x %02x %02x %02x %02x %02x %02x"
           "%c%c%c%c%c%c%c%c\n",
           nsv->nsvs_file_offset[i], size + nsv->nsvs_file_offset[i],
           b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],
           V(b[0]), V(b[1]), V(b[2]), V(b[3]), V(b[4]), V(b[5]), V(b[6]), V(b[7]) ));
    }
#undef V
#endif
    url_fseek(pb, nsv->base_offset + size, SEEK_SET);
    if (url_feof(pb))
        return -1;
    nsv->state = NSV_HAS_READ_NSVF;
    return 0;
}
['static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)\n{\n    NSVContext *nsv = s->priv_data;\n    ByteIOContext *pb = s->pb;\n    unsigned int file_size, size;\n    int64_t duration;\n    int strings_size;\n    int table_entries;\n    int table_entries_used;\n    PRINT(("%s()\\n", __FUNCTION__));\n    nsv->state = NSV_UNSYNC;\n    size = get_le32(pb);\n    if (size < 28)\n        return -1;\n    nsv->NSVf_end = size;\n    file_size = (uint32_t)get_le32(pb);\n    PRINT(("NSV NSVf chunk_size %u\\n", size));\n    PRINT(("NSV NSVf file_size %u\\n", file_size));\n    nsv->duration = duration = get_le32(pb);\n    PRINT(("NSV NSVf duration %"PRId64" ms\\n", duration));\n    strings_size = get_le32(pb);\n    table_entries = get_le32(pb);\n    table_entries_used = get_le32(pb);\n    PRINT(("NSV NSVf info-strings size: %d, table entries: %d, bis %d\\n",\n            strings_size, table_entries, table_entries_used));\n    if (url_feof(pb))\n        return -1;\n    PRINT(("NSV got header; filepos %"PRId64"\\n", url_ftell(pb)));\n    if (strings_size > 0) {\n        char *strings;\n        char *p, *endp;\n        char *token, *value;\n        char quote;\n        p = strings = av_mallocz(strings_size + 1);\n        endp = strings + strings_size;\n        get_buffer(pb, strings, strings_size);\n        while (p < endp) {\n            while (*p == \' \')\n                p++;\n            if (p >= endp-2)\n                break;\n            token = p;\n            p = strchr(p, \'=\');\n            if (!p || p >= endp-2)\n                break;\n            *p++ = \'\\0\';\n            quote = *p++;\n            value = p;\n            p = strchr(p, quote);\n            if (!p || p >= endp)\n                break;\n            *p++ = \'\\0\';\n            PRINT(("NSV NSVf INFO: %s=\'%s\'\\n", token, value));\n            av_metadata_set(&s->metadata, token, value);\n        }\n        av_free(strings);\n    }\n    if (url_feof(pb))\n        return -1;\n    PRINT(("NSV got infos; filepos %"PRId64"\\n", url_ftell(pb)));\n    if (table_entries_used > 0) {\n        int i;\n        nsv->index_entries = table_entries_used;\n        if((unsigned)table_entries_used >= UINT_MAX / sizeof(uint32_t))\n            return -1;\n        nsv->nsvs_file_offset = av_malloc((unsigned)table_entries_used * sizeof(uint32_t));\n        for(i=0;i<table_entries_used;i++)\n            nsv->nsvs_file_offset[i] = get_le32(pb) + size;\n        if(table_entries > table_entries_used &&\n           get_le32(pb) == MKTAG(\'T\',\'O\',\'C\',\'2\')) {\n            nsv->nsvs_timestamps = av_malloc((unsigned)table_entries_used*sizeof(uint32_t));\n            for(i=0;i<table_entries_used;i++) {\n                nsv->nsvs_timestamps[i] = get_le32(pb);\n            }\n        }\n    }\n    PRINT(("NSV got index; filepos %"PRId64"\\n", url_ftell(pb)));\n#ifdef DEBUG_DUMP_INDEX\n#define V(v) ((v<0x20 || v > 127)?\'.\':v)\n    PRINT(("NSV %d INDEX ENTRIES:\\n", table_entries));\n    PRINT(("NSV [dataoffset][fileoffset]\\n", table_entries));\n    for (i = 0; i < table_entries; i++) {\n        unsigned char b[8];\n        url_fseek(pb, size + nsv->nsvs_file_offset[i], SEEK_SET);\n        get_buffer(pb, b, 8);\n        PRINT(("NSV [0x%08lx][0x%08lx]: %02x %02x %02x %02x %02x %02x %02x %02x"\n           "%c%c%c%c%c%c%c%c\\n",\n           nsv->nsvs_file_offset[i], size + nsv->nsvs_file_offset[i],\n           b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],\n           V(b[0]), V(b[1]), V(b[2]), V(b[3]), V(b[4]), V(b[5]), V(b[6]), V(b[7]) ));\n    }\n#undef V\n#endif\n    url_fseek(pb, nsv->base_offset + size, SEEK_SET);\n    if (url_feof(pb))\n        return -1;\n    nsv->state = NSV_HAS_READ_NSVF;\n    return 0;\n}', 'unsigned int get_le32(ByteIOContext *s)\n{\n    unsigned int val;\n    val = get_le16(s);\n    val |= get_le16(s) << 16;\n    return val;\n}', 'unsigned int get_le16(ByteIOContext *s)\n{\n    unsigned int val;\n    val = get_byte(s);\n    val |= get_byte(s) << 8;\n    return val;\n}', 'int get_byte(ByteIOContext *s)\n{\n    if (s->buf_ptr < s->buf_end) {\n        return *s->buf_ptr++;\n    } else {\n        fill_buffer(s);\n        if (s->buf_ptr < s->buf_end)\n            return *s->buf_ptr++;\n        else\n            return 0;\n    }\n}', 'int url_feof(ByteIOContext *s)\n{\n    if(!s)\n        return 0;\n    return s->eof_reached;\n}', 'void *av_malloc(unsigned int size)\n{\n    void *ptr = NULL;\n#if CONFIG_MEMALIGN_HACK\n    long diff;\n#endif\n    if(size > (INT_MAX-16) )\n        return NULL;\n#if CONFIG_MEMALIGN_HACK\n    ptr = malloc(size+16);\n    if(!ptr)\n        return ptr;\n    diff= ((-(long)ptr - 1)&15) + 1;\n    ptr = (char*)ptr + diff;\n    ((char*)ptr)[-1]= diff;\n#elif HAVE_POSIX_MEMALIGN\n    if (posix_memalign(&ptr,16,size))\n        ptr = NULL;\n#elif HAVE_MEMALIGN\n    ptr = memalign(16,size);\n#else\n    ptr = malloc(size);\n#endif\n    return ptr;\n}']