[FFmpeg-soc] [soc]: r3525 - mlp/mlpenc.c

ramiro subversion at mplayerhq.hu
Fri Aug 22 01:58:29 CEST 2008


Author: ramiro
Date: Fri Aug 22 01:58:29 2008
New Revision: 3525

Log:
Use last_frame from context instead of trying to find it again.

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Fri Aug 22 01:58:29 2008
@@ -1443,7 +1443,6 @@ static uint8_t *write_substrs(MLPEncodeC
         uint8_t parity, checksum;
         PutBitContext pb, tmpb;
         int params_changed;
-        int last_block = 0;
 
         init_put_bits(&pb, buf, buf_size);
 
@@ -1469,11 +1468,6 @@ static uint8_t *write_substrs(MLPEncodeC
                 ctx->subblock_index = 0;
             }
 
-            if (ctx->frame_size[ctx->frame_index] < dp->blocksize) {
-                dp->blocksize = ctx->frame_size[ctx->frame_index];
-                last_block = 1;
-            }
-
             determine_bits(ctx, substr);
 
             params_changed = compare_decoding_params(ctx, &decoding_params[substr],
@@ -1510,7 +1504,7 @@ static uint8_t *write_substrs(MLPEncodeC
 
         put_bits(&pb, (-put_bits_count(&pb)) & 15, 0);
 
-        if (last_block) {
+        if (ctx->last_frame == ctx->sample_buffer) {
             /* TODO find a sample and implement shorten_by. */
             put_bits(&pb, 32, END_OF_STREAM);
         }



More information about the FFmpeg-soc mailing list