diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index 0e73804f438104a7762e9f8b0a9bbcb1c4d6223a..fd54fd31430a1be341c3a24c6fbae2d3b8b80855 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -104,7 +104,7 @@ static int read_frame(BVID_DemuxContext *vid, ByteIOContext *pb, AVPacket *pkt,
     int code;
     int bytes_copied = 0;
     int position;
-    size_t vidbuf_capacity;
+    unsigned int vidbuf_capacity;
 
     vidbuf_start = av_malloc(vidbuf_capacity = BUFFER_PADDING_SIZE);
     if(!vidbuf_start)