Mercurial > libavformat.hg
changeset 3986:2a7d8acde051 libavformat
matroskaenc: pass the packet size directly as parameter of mkv_blockgroup_size()
author | aurel |
---|---|
date | Sat, 04 Oct 2008 22:44:50 +0000 |
parents | acb0ad37d372 |
children | 632514d0ee21 |
files | matroskaenc.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskaenc.c Sat Oct 04 22:41:58 2008 +0000 +++ b/matroskaenc.c Sat Oct 04 22:44:50 2008 +0000 @@ -710,9 +710,9 @@ return 0; } -static int mkv_blockgroup_size(AVPacket *pkt) +static int mkv_blockgroup_size(int pkt_size) { - int size = pkt->size + 4; + int size = pkt_size + 4; size += ebml_num_size(size); size += 2; // EBML ID for block and block duration size += 8; // max size of block duration @@ -775,7 +775,7 @@ if (codec->codec_type != CODEC_TYPE_SUBTITLE) { mkv_write_block(s, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7); } else { - ebml_master blockgroup = start_ebml_master(pb, MATROSKA_ID_BLOCKGROUP, mkv_blockgroup_size(pkt)); + ebml_master blockgroup = start_ebml_master(pb, MATROSKA_ID_BLOCKGROUP, mkv_blockgroup_size(pkt->size)); duration = pkt->convergence_duration; mkv_write_block(s, MATROSKA_ID_BLOCK, pkt, 0); put_ebml_uint(pb, MATROSKA_ID_DURATION, duration);