[FFmpeg-cvslog] r15559 - trunk/libavformat/matroskaenc.c
aurel
subversion
Sun Oct 5 00:44:50 CEST 2008
Author: aurel
Date: Sun Oct 5 00:44:50 2008
New Revision: 15559
Log:
matroskaenc: pass the packet size directly as parameter of mkv_blockgroup_size()
Modified:
trunk/libavformat/matroskaenc.c
Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c (original)
+++ trunk/libavformat/matroskaenc.c Sun Oct 5 00:44:50 2008
@@ -710,9 +710,9 @@ static int mkv_write_header(AVFormatCont
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 @@ static int mkv_write_packet(AVFormatCont
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);
More information about the ffmpeg-cvslog
mailing list