summaryrefslogtreecommitdiff
path: root/libavformat/thp.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-02-05 14:44:04 +0000
committerPaul B Mahol <onemda@gmail.com>2015-02-06 09:42:53 +0000
commitdc3c3758ce6368aa2f0a9a9b544bce2e130cc4e1 (patch)
tree82da87872c0640ce96b93f21a0399dd2b48791a1 /libavformat/thp.c
parent69aa79365c1e8e1cb597d33e77bf1062c2ef47d4 (diff)
avformat/thp: check av_get_packet() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/thp.c')
-rw-r--r--libavformat/thp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/thp.c b/libavformat/thp.c
index 91fa90f942..727fb5095c 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -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);