[FFmpeg-cvslog] r18357 - trunk/libavformat/nuv.c

reimar subversion
Tue Apr 7 22:52:37 CEST 2009


Author: reimar
Date: Tue Apr  7 22:52:37 2009
New Revision: 18357

Log:
Error out also when reading nuv header returns with partial data and return
AVERROR(EIO) then.

Modified:
   trunk/libavformat/nuv.c

Modified: trunk/libavformat/nuv.c
==============================================================================
--- trunk/libavformat/nuv.c	Tue Apr  7 22:47:56 2009	(r18356)
+++ trunk/libavformat/nuv.c	Tue Apr  7 22:52:37 2009	(r18357)
@@ -199,8 +199,8 @@ static int nuv_packet(AVFormatContext *s
         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) {



More information about the ffmpeg-cvslog mailing list