aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/audio.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-06-19 03:59:34 +0000
committerMike Melanson <mike@multimedia.cx>2004-06-19 03:59:34 +0000
commit0bd586c50dc27ec38ca94e58f50030544d729463 (patch)
treedaa391f5efede8e58b88431b9b453dcbd1e6c2e0 /libavformat/audio.c
parentcbf5374fc0f733cefe304fd4d11c7b0fa21fba61 (diff)
downloadffmpeg-0bd586c50dc27ec38ca94e58f50030544d729463.tar.gz
sweeping change from -EIO -> AVERROR_IO
Originally committed as revision 3239 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/audio.c')
-rw-r--r--libavformat/audio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/audio.c b/libavformat/audio.c
index 5296333669..b03169accf 100644
--- a/libavformat/audio.c
+++ b/libavformat/audio.c
@@ -57,7 +57,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device)
audio_fd = open(audio_device, O_RDONLY);
if (audio_fd < 0) {
perror(audio_device);
- return -EIO;
+ return AVERROR_IO;
}
if (flip && *flip == '1') {
@@ -108,7 +108,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device)
default:
av_log(NULL, AV_LOG_ERROR, "Soundcard does not support 16 bit sample format\n");
close(audio_fd);
- return -EIO;
+ return AVERROR_IO;
}
err=ioctl(audio_fd, SNDCTL_DSP_SETFMT, &tmp);
if (err < 0) {
@@ -137,7 +137,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device)
return 0;
fail:
close(audio_fd);
- return -EIO;
+ return AVERROR_IO;
}
static int audio_close(AudioData *s)
@@ -158,7 +158,7 @@ static int audio_write_header(AVFormatContext *s1)
s->channels = st->codec.channels;
ret = audio_open(s, 1, NULL);
if (ret < 0) {
- return -EIO;
+ return AVERROR_IO;
} else {
return 0;
}
@@ -183,7 +183,7 @@ static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
if (ret > 0)
break;
if (ret < 0 && (errno != EAGAIN && errno != EINTR))
- return -EIO;
+ return AVERROR_IO;
}
s->buffer_ptr = 0;
}
@@ -222,7 +222,7 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap)
ret = audio_open(s, 0, ap->device);
if (ret < 0) {
av_free(st);
- return -EIO;
+ return AVERROR_IO;
}
/* take real parameters */
@@ -243,7 +243,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
struct audio_buf_info abufi;
if (av_new_packet(pkt, s->frame_size) < 0)
- return -EIO;
+ return AVERROR_IO;
for(;;) {
struct timeval tv;
fd_set fds;
@@ -268,7 +268,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
}
if (!(ret == 0 || (ret == -1 && (errno == EAGAIN || errno == EINTR)))) {
av_free_packet(pkt);
- return -EIO;
+ return AVERROR_IO;
}
}
pkt->size = ret;