diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-07-19 15:23:32 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-07-19 15:23:32 +0000 |
commit | 6f3e0b21748b53fd7b0471196bbda1d7e561f4fe (patch) | |
tree | 5130d5b49907a72bf1f16c7861ec3b891a3708e4 /libavformat/audio.c | |
parent | 769e10f0684c63aefb6fe36788f3e543312e185d (diff) | |
download | ffmpeg-6f3e0b21748b53fd7b0471196bbda1d7e561f4fe.tar.gz |
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/audio.c')
-rw-r--r-- | libavformat/audio.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/audio.c b/libavformat/audio.c index b17dcea8e7..ce209d1a9f 100644 --- a/libavformat/audio.c +++ b/libavformat/audio.c @@ -59,7 +59,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 AVERROR_IO; + return AVERROR(EIO); } if (flip && *flip == '1') { @@ -110,7 +110,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 AVERROR_IO; + return AVERROR(EIO); } err=ioctl(audio_fd, SNDCTL_DSP_SETFMT, &tmp); if (err < 0) { @@ -139,7 +139,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device) return 0; fail: close(audio_fd); - return AVERROR_IO; + return AVERROR(EIO); } static int audio_close(AudioData *s) @@ -160,7 +160,7 @@ static int audio_write_header(AVFormatContext *s1) s->channels = st->codec->channels; ret = audio_open(s, 1, s1->filename); if (ret < 0) { - return AVERROR_IO; + return AVERROR(EIO); } else { return 0; } @@ -185,7 +185,7 @@ static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt) if (ret > 0) break; if (ret < 0 && (errno != EAGAIN && errno != EINTR)) - return AVERROR_IO; + return AVERROR(EIO); } s->buffer_ptr = 0; } @@ -224,7 +224,7 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap) ret = audio_open(s, 0, s1->filename); if (ret < 0) { av_free(st); - return AVERROR_IO; + return AVERROR(EIO); } /* take real parameters */ @@ -245,7 +245,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 AVERROR_IO; + return AVERROR(EIO); for(;;) { struct timeval tv; fd_set fds; @@ -270,7 +270,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt) } if (!(ret == 0 || (ret == -1 && (errno == EAGAIN || errno == EINTR)))) { av_free_packet(pkt); - return AVERROR_IO; + return AVERROR(EIO); } } pkt->size = ret; |