Mercurial > libavformat.hg
comparison ipmovie.c @ 482:0fdc96c2f2fe libavformat
sweeping change from -EIO -> AVERROR_IO
author | melanson |
---|---|
date | Sat, 19 Jun 2004 03:59:34 +0000 |
parents | b69898ffc92a |
children | f4e9e55f703c |
comparison
equal
deleted
inserted
replaced
481:f1430abbbd8b | 482:0fdc96c2f2fe |
---|---|
32 | 32 |
33 #include "avformat.h" | 33 #include "avformat.h" |
34 | 34 |
35 /* debugging support: #define DEBUG_IPMOVIE as non-zero to see extremely | 35 /* debugging support: #define DEBUG_IPMOVIE as non-zero to see extremely |
36 * verbose information about the demux process */ | 36 * verbose information about the demux process */ |
37 #define DEBUG_IPMOVIE 0 | 37 #define DEBUG_IPMOVIE 1 |
38 | 38 |
39 #if DEBUG_IPMOVIE | 39 #if DEBUG_IPMOVIE |
40 #define debug_ipmovie printf | 40 #define debug_ipmovie printf |
41 #else | 41 #else |
42 static inline void debug_ipmovie(const char *format, ...) { } | 42 static inline void debug_ipmovie(const char *format, ...) { } |
541 | 541 |
542 /* peek ahead to the next chunk-- if it is an init audio chunk, process | 542 /* peek ahead to the next chunk-- if it is an init audio chunk, process |
543 * it; if it is the first video chunk, this is a silent file */ | 543 * it; if it is the first video chunk, this is a silent file */ |
544 if (get_buffer(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) != | 544 if (get_buffer(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) != |
545 CHUNK_PREAMBLE_SIZE) | 545 CHUNK_PREAMBLE_SIZE) |
546 return -EIO; | 546 return AVERROR_IO; |
547 chunk_type = LE_16(&chunk_preamble[2]); | 547 chunk_type = LE_16(&chunk_preamble[2]); |
548 url_fseek(pb, -CHUNK_PREAMBLE_SIZE, SEEK_CUR); | 548 url_fseek(pb, -CHUNK_PREAMBLE_SIZE, SEEK_CUR); |
549 | 549 |
550 if (chunk_type == CHUNK_VIDEO) | 550 if (chunk_type == CHUNK_VIDEO) |
551 ipmovie->audio_type = 0; /* no audio */ | 551 ipmovie->audio_type = 0; /* no audio */ |
598 | 598 |
599 ret = process_ipmovie_chunk(ipmovie, pb, pkt); | 599 ret = process_ipmovie_chunk(ipmovie, pb, pkt); |
600 if (ret == CHUNK_BAD) | 600 if (ret == CHUNK_BAD) |
601 ret = AVERROR_INVALIDDATA; | 601 ret = AVERROR_INVALIDDATA; |
602 else if (ret == CHUNK_EOF) | 602 else if (ret == CHUNK_EOF) |
603 ret = -EIO; | 603 ret = AVERROR_IO; |
604 else if (ret == CHUNK_NOMEM) | 604 else if (ret == CHUNK_NOMEM) |
605 ret = AVERROR_NOMEM; | 605 ret = AVERROR_NOMEM; |
606 else | 606 else |
607 ret = 0; | 607 ret = 0; |
608 | 608 |