avformat/thp: check av_get_packet() for failure
authorPaul B Mahol <onemda@gmail.com>
Thu, 5 Feb 2015 14:44:04 +0000 (14:44 +0000)
committerPaul B Mahol <onemda@gmail.com>
Fri, 6 Feb 2015 09:42:53 +0000 (09:42 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/thp.c

index 91fa90f..727fb50 100644 (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);