[soc]: r5950 - wtvmuxer/wtvenc.c
Author: spyfeng Date: Sun Apr 17 05:45:48 2011 New Revision: 5950 Log: fix segment fault errors. Modified: wtvmuxer/wtvenc.c Modified: wtvmuxer/wtvenc.c ============================================================================== --- wtvmuxer/wtvenc.c Sat Apr 16 11:32:11 2011 (r5949) +++ wtvmuxer/wtvenc.c Sun Apr 17 05:45:48 2011 (r5950) @@ -210,13 +210,14 @@ static int wtv_write_trailer(AVFormatCon // update root value avio_seek(pb, wctx->init_root_pos, SEEK_SET); - avio_wl32(pb + 16, root_szie); - avio_wl32(pb + 24, wctx->sector_pos >> WTV_SECTOR_BITS); + avio_wl32(pb, root_szie); + avio_seek(pb, 4, SEEK_CUR); + avio_wl32(pb, wctx->sector_pos >> WTV_SECTOR_BITS); // update sector value - avio_seek(pb, wctx->sector_pos, SEEK_SET); - avio_wl32(pb + 16, root_szie); - avio_wl64(pb + 20, file_len); + avio_seek(pb, wctx->sector_pos + 16, SEEK_SET); + avio_wl32(pb, root_szie); + avio_wl64(pb, file_len); return 0; }
participants (1)
-
spyfeng