Commit bd51872a authored by reimar's avatar reimar

Error out also when reading nuv header returns with partial data and return

AVERROR(EIO) then.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18357 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 773a4028
...@@ -199,8 +199,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { ...@@ -199,8 +199,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0; int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0;
uint64_t pos = url_ftell(pb); uint64_t pos = url_ftell(pb);
ret = get_buffer(pb, hdr, HDRSIZE); ret = get_buffer(pb, hdr, HDRSIZE);
if (ret <= 0) if (ret < HDRSIZE)
return ret ? ret : -1; return ret < 0 ? ret : AVERROR(EIO);
frametype = hdr[0]; frametype = hdr[0];
size = PKTSIZE(AV_RL32(&hdr[8])); size = PKTSIZE(AV_RL32(&hdr[8]));
switch (frametype) { switch (frametype) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment