[FFmpeg-soc] [soc]: r3468 - mlp/mlpenc.c
ramiro
subversion at mplayerhq.hu
Tue Aug 19 19:33:06 CEST 2008
Author: ramiro
Date: Tue Aug 19 19:33:06 2008
New Revision: 3468
Log:
Don't keep an array of frame_number in the context. Use avctx->frame_number
even if is lagged by MAJOR_HEADER_INTERVAL, since it still gives us the
correct remainder of frame_number % MAJOR_HEADER_INTERVAL.
Modified:
mlp/mlpenc.c
Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c (original)
+++ mlp/mlpenc.c Tue Aug 19 19:33:06 2008
@@ -103,7 +103,6 @@ typedef struct {
int32_t *lossless_check_data;
unsigned int frame_size[MAJOR_HEADER_INTERVAL];
- unsigned int frame_number[MAJOR_HEADER_INTERVAL];
unsigned int frame_index;
unsigned int one_sample_buffer_size;
@@ -1362,7 +1361,7 @@ static int mlp_encode_frame(AVCodecConte
buf += 4;
buf_size -= 4;
- restart_frame = !(ctx->frame_number[ctx->frame_index] & (MAJOR_HEADER_INTERVAL - 1));
+ restart_frame = !(avctx->frame_number & (MAJOR_HEADER_INTERVAL - 1));
if (restart_frame) {
if (buf_size < 28)
@@ -1414,7 +1413,6 @@ input_and_return:
if (data) {
ctx->frame_size[ctx->frame_index] = avctx->frame_size;
- ctx->frame_number[ctx->frame_index] = avctx->frame_number;
input_data(ctx, data);
} else if (!ctx->last_frame) {
ctx->last_frame = ctx->sample_buffer;
More information about the FFmpeg-soc
mailing list