[FFmpeg-devel] Patch for LPCM in mpeg-ts (as seen on bluray)
Frank Barchard
fbarchard
Thu Jul 23 20:41:42 CEST 2009
On Thu, Jul 23, 2009 at 9:13 AM, Christian P. Schmidt <schmidt at digadd.de>wrote:
> The attached patch brings LPCM support for mpeg-ts streams as it is found
> on BluRays. Patching probably requires patch -p2.
I previously googled lpcm support and found reference to Baptist doing an
ffmpeg patch for it? It didnt seem to make it in though.
> - switch (p[2] & 0x0f) {
> - case 1:
> - pes->st->codec->sample_rate = 48000;
> - break;
> - case 4:
> - pes->st->codec->sample_rate = 96000;
> - break;
Is there 44100? What are the other values? your switch doesnt handle?
>
> - switch ((p[2] >> 4) && 0x0f) {
> - case 1: // 1/0, untested
> - case 3: // 2/0
> - pes->st->codec->channels = 2;
> - break;
If I understand the comment, 1/0 means mono? You should fill in the correct
number of channels or bad things will happen.
svn diff is the safest bet. cheers
More information about the ffmpeg-devel
mailing list