[FFmpeg-devel] [PATCH] flac encoding, issue 526
Michael Niedermayer
michaelni
Sun Jul 20 19:34:10 CEST 2008
On Sun, Jul 20, 2008 at 12:26:43PM -0400, Justin Ruggles wrote:
> Mathieu Velten wrote:
> > regarding your previous comments, here is an other try :)
> >
> > [...]
> > +static void update_nb_samples_streaminfo(uint64_t nb_samples,
> uint8_t *header)
> > +{
> > + PutBitContext pb;
> > +
> > + init_put_bits(&pb, header, FLAC_STREAMINFO_SIZE);
> > +
> > + /* copy the beginning of the header */
> > + ff_copy_bits(&pb, header, 108);
> > + /* Write the number of samples in two times */
> > + put_bits(&pb, 24, (nb_samples >> 12));
> > + put_bits(&pb, 12, nb_samples);
> > + flush_put_bits(&pb);
> > + /* MD5 signature = 0 */
> > +}
>
> You don't need to create a whole new partially-duplicate function. You
> can do something like:
or even better just call the existig write_streaminfo()
its not as if the function is over its best before date when the fileend
is reached.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- 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/20080720/626f9b3f/attachment.pgp>
More information about the ffmpeg-devel
mailing list