changeset 4820:bb26039e5f8c libavformat

Error out also when reading nuv header returns with partial data and return AVERROR(EIO) then.
author reimar
date Tue, 07 Apr 2009 20:52:37 +0000
parents 8d2bbb402995
children 810c0bbb435e
files nuv.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/nuv.c	Tue Apr 07 20:47:56 2009 +0000
+++ b/nuv.c	Tue Apr 07 20:52:37 2009 +0000
@@ -199,8 +199,8 @@
         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) {