[FFmpeg-devel] [PATCH] set bits_per_raw_sample in pcm decoder

Justin Ruggles justin.ruggles
Thu Jun 10 19:00:33 CEST 2010

Michael Niedermayer wrote:

> On Sun, Jun 06, 2010 at 02:00:13PM -0400, Justin Ruggles wrote:
>> Hi,
>> The pcm decoder needs to set bits_per_raw_sample when sample_fmt is
>> SAMPLE_FMT_S32.  This information can then be passed to the encoder,
>> which can make use of it (ffmpeg.c does this).
>> In particular, lossless codecs that can encode 24-bit audio need to
>> write stream and/or frame values with the bits per sample of the source.
>>  Also, the checksums (e.g. MD5 for FLAC, CRC32 for ALS) are based on
>> 3-byte source data for 24-bit audio.  The encoder cannot distinguish
>> between 24-bit and 32-bit source without having bits_per_raw_sample set.
>> -Justin
>>  pcm.c |    4 ++++
>>  1 file changed, 4 insertions(+)
>> dc4586102e2dc3098343c94b2a904419e95ebec5  pcm_bits_per_raw_sample.patch
> looks ok if it passes tests

Passes tests.  Applied.


More information about the ffmpeg-devel mailing list