avformat/thp: check av_get_packet() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2015-02-05 14:44:04 +00:00
parent 69aa79365c
commit dc3c3758ce

View File

@ -176,6 +176,8 @@ static int thp_read_packet(AVFormatContext *s,
thp->frame++;
ret = av_get_packet(pb, pkt, size);
if (ret < 0)
return ret;
if (ret != size) {
av_free_packet(pkt);
return AVERROR(EIO);