Mercurial > libavformat.hg
comparison nuv.c @ 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 | 2809dfd4c881 |
children | a751c4815d2d |
comparison
equal
deleted
inserted
replaced
4819:8d2bbb402995 | 4820:bb26039e5f8c |
---|---|
197 int ret, size; | 197 int ret, size; |
198 while (!url_feof(pb)) { | 198 while (!url_feof(pb)) { |
199 int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0; | 199 int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0; |
200 uint64_t pos = url_ftell(pb); | 200 uint64_t pos = url_ftell(pb); |
201 ret = get_buffer(pb, hdr, HDRSIZE); | 201 ret = get_buffer(pb, hdr, HDRSIZE); |
202 if (ret <= 0) | 202 if (ret < HDRSIZE) |
203 return ret ? ret : -1; | 203 return ret < 0 ? ret : AVERROR(EIO); |
204 frametype = hdr[0]; | 204 frametype = hdr[0]; |
205 size = PKTSIZE(AV_RL32(&hdr[8])); | 205 size = PKTSIZE(AV_RL32(&hdr[8])); |
206 switch (frametype) { | 206 switch (frametype) { |
207 case NUV_EXTRADATA: | 207 case NUV_EXTRADATA: |
208 if (!ctx->rtjpg_video) { | 208 if (!ctx->rtjpg_video) { |