diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2011-06-24 14:02:41 +0400 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2011-06-25 13:03:23 +0400 |
commit | 392aa6e444f13aaddcf3d215b1058640a2ada846 (patch) | |
tree | e409a78774a813eabbde24f45fcf9ee27cf9fbf1 /libavformat/oggdec.c | |
parent | dca3542d35c8b1769f9fd32641567ffa2346327e (diff) |
ogg_read_packet: forward error code.
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r-- | libavformat/oggdec.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 655da35dd4..08de280c0e 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -550,15 +550,16 @@ static int ogg_read_packet(AVFormatContext *s, AVPacket *pkt) { struct ogg *ogg; struct ogg_stream *os; - int idx = -1; + int idx = -1, ret; int pstart, psize; int64_t fpos, pts, dts; //Get an ogg packet retry: do{ - if (ogg_packet (s, &idx, &pstart, &psize, &fpos) < 0) - return AVERROR(EIO); + ret = ogg_packet (s, &idx, &pstart, &psize, &fpos); + if (ret < 0) + return ret; }while (idx < 0 || !s->streams[idx]); ogg = s->priv_data; @@ -572,8 +573,9 @@ retry: os->keyframe_seek = 0; //Alloc a pkt - if (av_new_packet (pkt, psize) < 0) - return AVERROR(EIO); + ret = av_new_packet (pkt, psize); + if (ret < 0) + return ret; pkt->stream_index = idx; memcpy (pkt->data, os->buf + pstart, psize); |