diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-01-07 14:55:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-08 01:32:26 +0100 |
commit | 45e7c67affb57f0286fc111e61686025f4ef4a04 (patch) | |
tree | c00b4d1c671acb6f59837c2f41064340ed5a862e /libavformat/vqf.c | |
parent | bb20f3dd730689c3a99f7820cff8b74b06992fff (diff) | |
download | ffmpeg-45e7c67affb57f0286fc111e61686025f4ef4a04.tar.gz |
avformat: Improve returned error codes
This commit improves returned error codes by forwarding error codes. In
some instances, the hardcoded returned error codes made no sense at all:
The normal error code for failure of av_new_packet() is AVERROR(ENOMEM),
yet there were instances where AVERROR(EIO) was returned.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/vqf.c')
-rw-r--r-- | libavformat/vqf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/vqf.c b/libavformat/vqf.c index b43725b3c1..2916ee64fa 100644 --- a/libavformat/vqf.c +++ b/libavformat/vqf.c @@ -237,8 +237,8 @@ static int vqf_read_packet(AVFormatContext *s, AVPacket *pkt) int ret; int size = (c->frame_bit_len - c->remaining_bits + 7)>>3; - if (av_new_packet(pkt, size+2) < 0) - return AVERROR(EIO); + if ((ret = av_new_packet(pkt, size + 2)) < 0) + return ret; pkt->pos = avio_tell(s->pb); pkt->stream_index = 0; |