# HG changeset patch # User reimar # Date 1239137557 0 # Node ID bb26039e5f8c80439352e02c262bfc5d9ed17e05 # Parent 8d2bbb402995e02bcbe729e4eff230c903d86c84 Error out also when reading nuv header returns with partial data and return AVERROR(EIO) then. diff -r 8d2bbb402995 -r bb26039e5f8c nuv.c --- 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) {