[Ffmpeg-devel] [PATCH] flacenc - md5
Michael Niedermayer
michaelni
Sun Jul 9 12:04:19 CEST 2006
Hi
On Sat, Jul 08, 2006 at 10:41:05PM -0400, Justin Ruggles wrote:
> sheesh. I do need my cola tonight. The regression references would need
> to be updated as well. Here is a patch with regression updates.
all things you do in the flac muxer will be missing if flac is stored in
other containers, is raw flac more common then flac in ogg?
the problem i have with the changes is that theres lots of new code
but the md5 will still be missing if flac is stored in any container
furthermore the md5 isnt really mandatory so unless you can find a
simple way to set the md5 which then also works with other containers,
iam against setting it at all in lav*
[...]
> // keep current count of audio samples
> if(pkt->pts != AV_NOPTS_VALUE) {
> flac->sample_count = (float)(pkt->pts+pkt->duration) *
> (float)st->time_base.num /
> (float)st->time_base.den *
> (float)st->codec->sample_rate + 0.5;
use av_rescale(), floats are unacceptable and inaccurate
> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c (revision 5683)
> +++ ffmpeg.c (working copy)
> @@ -1393,13 +1393,11 @@
> ret = 0;
> /* encode any samples remaining in fifo */
> if(fifo_bytes > 0 && enc->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) {
> - int fs_tmp = enc->frame_size;
> enc->frame_size = fifo_bytes / (2 * enc->channels);
> if(fifo_read(&ost->fifo, (uint8_t *)samples, fifo_bytes,
> &ost->fifo.rptr) == 0) {
> ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, samples);
> }
> - enc->frame_size = fs_tmp;
> }
> if(ret <= 0) {
> ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, NULL);
this change seems unrelated ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list