diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-07 20:52:37 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-07 20:52:37 +0000 |
commit | 4e5735f77429d11a3c981080d8f2177c86c2d929 (patch) | |
tree | 91009a8f971a592374eb2ad9f0b1e11f83955f54 /libavformat/nuv.c | |
parent | 2fa6bc789f0920e8c889e7cbf9893400f692d49b (diff) | |
download | ffmpeg-4e5735f77429d11a3c981080d8f2177c86c2d929.tar.gz |
Error out also when reading nuv header returns with partial data and return
AVERROR(EIO) then.
Originally committed as revision 18357 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/nuv.c')
-rw-r--r-- | libavformat/nuv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/nuv.c b/libavformat/nuv.c index 9c139e8130..3339a74991 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -199,8 +199,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0; uint64_t pos = url_ftell(pb); ret = get_buffer(pb, hdr, HDRSIZE); - if (ret <= 0) - return ret ? ret : -1; + if (ret < HDRSIZE) + return ret < 0 ? ret : AVERROR(EIO); frametype = hdr[0]; size = PKTSIZE(AV_RL32(&hdr[8])); switch (frametype) { |