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
1 changed files with 2 additions and 0 deletions

View File

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