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

Michael Niedermayer michaelni
Fri Jul 25 13:42:35 CEST 2008


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


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080725/6831d311/attachment.pgp>



More information about the ffmpeg-devel mailing list