GNOME Bugzilla – Bug 316725
Audioconvert caps fixate problems
Last modified: 2005-11-23 17:00:29 UTC
Take a mono channel wav for example and try to reencode it in wav using audioconvert beteween... like :gst-launch-0.8 -v filesrc location=test-mono.wav ! wavparse ! audioconvert ! wavenc ! filesink location="test.out" This will produce a 2 channel wav file /pipeline0/audioconvert0.sink: caps = audio/x-raw-int, endianness=(int)1234, width=(int)8, depth=(int)8, signed=(boolean)false, rate=(int)8000, channels=(int)1 /pipeline0/audioconvert0.src: caps = audio/x-raw-int, rate=(int)8000, channels=(int)2, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true When it should be 1 channel The issue is in gst_audio_convert_fixate (GstPad * pad, const GstCaps * caps) if (!GST_PAD_IS_NEGOTIATING (otherpad)) { try.channels = 2; try.width = 16; try.depth = 16; try.endianness = G_BYTE_ORDER; } I have no idea why it return these defaults... to me it seems it should return null , and if it does return null it fixes the problem... Anyone would know why there was these default values there ?? if not : if (!GST_PAD_IS_NEGOTIATING (otherpad)) return NULL; would fix it.... Thanks a lot Antoine Tremblay
Audioconvert correctly fixates on mono using this pipeline in 0.9. Using the above pipeline using gst-launch-0.9 produces a mono wav file.