]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/dsicin.c
Replace PATCHWELCOME by relevant error codes.
[ffmpeg] / libavformat / dsicin.c
index 20b1d02f36e42c59e9f5d90cc4572adbc48635bf..e0db8ba10ed5d516aa0de0d4b6ce693305be3516 100644 (file)
@@ -27,6 +27,7 @@
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
 #include "internal.h"
+#include "avio_internal.h"
 
 
 typedef struct CinFileHeader {
@@ -179,6 +180,8 @@ static int cin_read_packet(AVFormatContext *s, AVPacket *pkt)
         /* palette and video packet */
         pkt_size = (palette_type + 3) * hdr->pal_colors_count + hdr->video_frame_size;
 
+        pkt_size = ffio_limit(pb, pkt_size);
+
         ret = av_new_packet(pkt, 4 + pkt_size);
         if (ret < 0)
             return ret;