From b372723f6a60f362e7b007a4bac2fac68da90b13 Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Sun, 6 Nov 2011 12:14:31 +1100 Subject: wtvenc: ensure fat tables are padded to the sector boundary Signed-off-by: Michael Niedermayer --- libavformat/wtvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/wtvenc.c') diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c index 887ee729f1..d1c446ccb0 100644 --- a/libavformat/wtvenc.c +++ b/libavformat/wtvenc.c @@ -532,7 +532,7 @@ static void write_fat(AVIOContext *pb, int start_sector, int nb_sectors, int shi avio_wl32(pb, start_sector + (i << shift)); } // pad left sector pointer size - write_pad(pb, WTV_SECTOR_SIZE - (nb_sectors << 2)); + write_pad(pb, WTV_SECTOR_SIZE - ((nb_sectors << 2) % WTV_SECTOR_SIZE)); } static int write_fat_sector(AVFormatContext *s, int64_t start_pos, int nb_sectors, int sector_bits, int depth) -- cgit v1.2.3