summaryrefslogtreecommitdiff
path: root/libavformat/wc3movie.c
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis.issaris@uhasselt.be>2007-07-19 15:23:32 +0000
committerPanagiotis Issaris <takis.issaris@uhasselt.be>2007-07-19 15:23:32 +0000
commit6f3e0b21748b53fd7b0471196bbda1d7e561f4fe (patch)
tree5130d5b49907a72bf1f16c7861ec3b891a3708e4 /libavformat/wc3movie.c
parent769e10f0684c63aefb6fe36788f3e543312e185d (diff)
Replace all occurrences of AVERROR_IO with AVERROR(EIO).
Originally committed as revision 9760 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/wc3movie.c')
-rw-r--r--libavformat/wc3movie.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index 2692de408b..84b67005d8 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -152,7 +152,7 @@ static int wc3_read_header(AVFormatContext *s,
* the first BRCH tag */
if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
WC3_PREAMBLE_SIZE)
- return AVERROR_IO;
+ return AVERROR(EIO);
fourcc_tag = AV_RL32(&preamble[0]);
size = (AV_RB32(&preamble[4]) + 1) & (~1);
@@ -169,7 +169,7 @@ static int wc3_read_header(AVFormatContext *s,
/* need the number of palettes */
url_fseek(pb, 8, SEEK_CUR);
if ((ret = get_buffer(pb, preamble, 4)) != 4)
- return AVERROR_IO;
+ return AVERROR(EIO);
wc3->palette_count = AV_RL32(&preamble[0]);
if((unsigned)wc3->palette_count >= UINT_MAX / PALETTE_SIZE){
wc3->palette_count= 0;
@@ -185,14 +185,14 @@ static int wc3_read_header(AVFormatContext *s,
else
bytes_to_read = 512;
if ((ret = get_buffer(pb, s->title, bytes_to_read)) != bytes_to_read)
- return AVERROR_IO;
+ return AVERROR(EIO);
break;
case SIZE_TAG:
/* video resolution override */
if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
WC3_PREAMBLE_SIZE)
- return AVERROR_IO;
+ return AVERROR(EIO);
wc3->width = AV_RL32(&preamble[0]);
wc3->height = AV_RL32(&preamble[4]);
break;
@@ -204,7 +204,7 @@ static int wc3_read_header(AVFormatContext *s,
if ((ret = get_buffer(pb,
&wc3->palettes[current_palette * PALETTE_SIZE],
PALETTE_SIZE)) != PALETTE_SIZE)
- return AVERROR_IO;
+ return AVERROR(EIO);
/* transform the current palette in place */
for (i = current_palette * PALETTE_SIZE;
@@ -228,7 +228,7 @@ static int wc3_read_header(AVFormatContext *s,
if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
WC3_PREAMBLE_SIZE)
- return AVERROR_IO;
+ return AVERROR(EIO);
fourcc_tag = AV_RL32(&preamble[0]);
/* chunk sizes are 16-bit aligned */
size = (AV_RB32(&preamble[4]) + 1) & (~1);
@@ -289,7 +289,7 @@ static int wc3_read_packet(AVFormatContext *s,
/* get the next chunk preamble */
if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
WC3_PREAMBLE_SIZE)
- ret = AVERROR_IO;
+ ret = AVERROR(EIO);
fourcc_tag = AV_RL32(&preamble[0]);
/* chunk sizes are 16-bit aligned */
@@ -304,7 +304,7 @@ static int wc3_read_packet(AVFormatContext *s,
case SHOT_TAG:
/* load up new palette */
if ((ret = get_buffer(pb, preamble, 4)) != 4)
- return AVERROR_IO;
+ return AVERROR(EIO);
palette_number = AV_RL32(&preamble[0]);
if (palette_number >= wc3->palette_count)
return AVERROR_INVALIDDATA;
@@ -324,7 +324,7 @@ static int wc3_read_packet(AVFormatContext *s,
pkt->stream_index = wc3->video_stream_index;
pkt->pts = wc3->pts;
if (ret != size)
- ret = AVERROR_IO;
+ ret = AVERROR(EIO);
packet_read = 1;
break;
@@ -334,7 +334,7 @@ static int wc3_read_packet(AVFormatContext *s,
url_fseek(pb, size, SEEK_CUR);
#else
if ((unsigned)size > sizeof(text) || (ret = get_buffer(pb, text, size)) != size)
- ret = AVERROR_IO;
+ ret = AVERROR(EIO);
else {
int i = 0;
av_log (s, AV_LOG_DEBUG, "Subtitle time!\n");
@@ -353,7 +353,7 @@ static int wc3_read_packet(AVFormatContext *s,
pkt->stream_index = wc3->audio_stream_index;
pkt->pts = wc3->pts;
if (ret != size)
- ret = AVERROR_IO;
+ ret = AVERROR(EIO);
/* time to advance pts */
wc3->pts += WC3_FRAME_PTS_INC;