[SCM] libav/experimental: Error out also when reading nuv header returns with partial data and return AVERROR(EIO) then.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:43:25 UTC 2013
The following commit has been merged in the experimental branch:
commit 4e5735f77429d11a3c981080d8f2177c86c2d929
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date: Tue Apr 7 20:52:37 2009 +0000
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
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 9c139e8..3339a74 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) {
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list