[FFmpeg-devel] [PATCH] flac encoding, issue 526

Justin Ruggles justin.ruggles
Sun Sep 14 22:06:38 CEST 2008


Michael Niedermayer wrote:
> On Mon, Jul 21, 2008 at 02:22:36PM +0200, Mathieu Velten wrote:
>> final (?) patch attached.
> 
> [...]
>> @@ -142,8 +143,10 @@
>>      put_bits(&pb, 20, s->samplerate);
>>      put_bits(&pb, 3, s->channels-1);
>>      put_bits(&pb, 5, 15);       /* bits per sample - 1 */
>> +    /* Write the number of samples in two times */
>> +    put_bits(&pb, 24, (s->sample_count >> 12));
>> +    put_bits(&pb, 12, s->sample_count);
> 
> you have to mask the high 24 bits out as well
> 
> 
>>      flush_put_bits(&pb);
>> -    /* total samples = 0 */
>>      /* MD5 signature = 0 */
>>  }
>>  
> 
>> @@ -383,6 +386,7 @@
>>      avctx->extradata_size = FLAC_STREAMINFO_SIZE;
>>  
>>      s->frame_count = 0;
>> +    s->sample_count = 0;
> 
> i think this is unneeded

applied a slightly modified version of the patch.

-Justin





More information about the ffmpeg-devel mailing list