[FFmpeg-devel] [PATCH 1/2] avformat/thp: check av_get_packet() for failure

Paul B Mahol onemda at gmail.com
Thu Feb 5 16:08:16 CET 2015


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavformat/thp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/thp.c b/libavformat/thp.c
index 91fa90f..727fb50 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);
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list