# HG changeset patch # User bindhammer # Date 1282816979 0 # Node ID 1b8f44e2754e79f12324709d5e9118d76546b151 # Parent 7defcfe74c72bc987b946e52ecf89385bee04458 Setting proper values in extradata for future use in muxer diff -r 7defcfe74c72 -r 1b8f44e2754e a64multienc.c --- a/a64multienc.c Thu Aug 26 07:39:34 2010 +0000 +++ b/a64multienc.c Thu Aug 26 10:02:59 2010 +0000 @@ -199,6 +199,12 @@ c->mc_colram = av_mallocz(CHARSET_CHARS * sizeof(uint8_t)); c->mc_charset = av_malloc (0x800 * (INTERLACED+1) * sizeof(uint8_t)); + /* set up extradata */ + avctx->extradata = av_mallocz(8 * 4 + FF_INPUT_BUFFER_PADDING_SIZE); + avctx->extradata_size = 8 * 4; + AV_WB32(avctx->extradata, c->mc_lifetime); + AV_WB32(avctx->extradata+16, INTERLACED); + avcodec_get_frame_defaults(&c->picture); avctx->coded_frame = &c->picture; avctx->coded_frame->pict_type = FF_I_TYPE; @@ -243,6 +249,10 @@ int *meta = c->mc_meta_charset; int *best_cb = c->mc_best_cb; + int charset_size = 0x800 * (INTERLACED + 1); + int screen_size = 0x400; + int colram_size = 0x100 * c->mc_use_5col; + /* no data, means end encoding asap */ if (!data) { /* all done, end encoding */ @@ -314,6 +324,10 @@ charmap += 1000; } + AV_WB32(avctx->extradata+4, c->mc_frame_counter); + AV_WB32(avctx->extradata+8, charset_size); + AV_WB32(avctx->extradata+12, screen_size + colram_size); + /* reset counter */ c->mc_frame_counter = 0;