[FFmpeg-devel] [PATCH] wtvenc: ensure fat tables are padded to the sector boundary

Peter Ross pross at xvid.org
Sun Nov 6 02:14:31 CET 2011


---
Hi, I changed comment.

 libavformat/wtvenc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c
index 887ee72..d1c446c 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)
-- 
1.7.7.1

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111106/33477588/attachment.asc>


More information about the ffmpeg-devel mailing list