[MPlayer-dev-eng] [PATCH] parameter on command line for raw lpcm audio got lost in dvdpcm codec

xun gu noguxun at gmail.com
Sat Jun 2 05:10:59 CEST 2012


How to reproduce the problem:

try to play a raw pcm will below command :

mplayer -demuxer rawaudio -rawaudio
samplesize=2:channels=1:rate=44100:format=0x10001
http://res.wordjp.com/mplayer/rawaudio_patch/B-LPCM-1.pcm

>From the console output, we can see that the dvdpcm codec is using the
default setting, all the setting on the command line were ignored.
And audio is not played correctly.
===============
Opening audio decoder: [dvdpcm] Uncompressed DVD/VOB LPCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16be, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [dvdpcm] afm: dvdpcm (Uncompressed DVD/VOB LPCM)
===============


after the fix, we can play the the same content like
./mplayer -demuxer rawaudio -rawaudio
sampleformat=0x8:samplesize=2:channels=1:rate=44100:format=0x10001
http://res.wordjp.com/mplayer/rawaudio_patch/B-LPCM-1.pcm


Description of the patch:
1. a new sampleformat config was added
the value of the sampleformat was defined in af_format.h, the value 8
here means AF_FORMAT_S16_BE.

2. make sure other configsare not ignored, default value will not
overwrite the pre-set values from configuration.

-------------
Xun Gu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rawaudio_parameter.diff
Type: application/octet-stream
Size: 2237 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120602/1a5a2bb9/attachment.obj>


More information about the MPlayer-dev-eng mailing list