mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 04:17:05 +00:00
Error out also when reading nuv header returns with partial data and return
AVERROR(EIO) then. Originally committed as revision 18357 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2fa6bc789f
commit
4e5735f774
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user