Do not invent error codes but pass the error code on.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 27 Nov 2009 13:48:37 +0000 (13:48 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 27 Nov 2009 13:48:37 +0000 (13:48 +0000)
Originally committed as revision 20630 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavdevice/oss_audio.c

index 8876bd2..f3edbdb 100644 (file)
@@ -248,8 +248,8 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
     int64_t cur_time;
     struct audio_buf_info abufi;
 
-    if (av_new_packet(pkt, s->frame_size) < 0)
-        return AVERROR(EIO);
+    if ((ret=av_new_packet(pkt, s->frame_size)) < 0)
+        return ret;
 
         ret = read(s->fd, pkt->data, pkt->size);
     if (ret <= 0){