]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/thp.c
Merge commit 'eea769df322fac2601a96db195fa7dc8d12a8fbc'
[ffmpeg] / libavformat / thp.c
index 714cec6cd32485ab26070307b5084eb56d8c5c7f..727fb5095c09924a99a3224c782e9a643c3d937a 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);
@@ -184,6 +186,8 @@ static int thp_read_packet(AVFormatContext *s,
         pkt->stream_index = thp->video_stream_index;
     } else {
         ret = av_get_packet(pb, pkt, thp->audiosize);
+        if (ret < 0)
+            return ret;
         if (ret != thp->audiosize) {
             av_free_packet(pkt);
             return AVERROR(EIO);