From dc3c3758ce6368aa2f0a9a9b544bce2e130cc4e1 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Thu, 5 Feb 2015 14:44:04 +0000 Subject: [PATCH] avformat/thp: check av_get_packet() for failure Signed-off-by: Paul B Mahol --- libavformat/thp.c | 2 ++ 1 file changed, 2 insertions(+) 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);