GNOME Bugzilla – Bug 733190
[regression] aacparse: raw to ADTS conversion no longer works
Last modified: 2014-07-16 15:43:44 UTC
Using aacparse to convert from stream-format=raw to stream-format=adts no longer works. This can be demonstrated by the following: gst-launch-1.0 souphttpsrc location=http://rdmedia.bbc.co.uk/dash/ondemand/bbb/avc3/1/client_manifest-audio.mpd ! dashdemux ! qtdemux ! aacparse ! audio/mpeg,stream-format=adts ! faad ! audioconvert ! alsasink Removing the caps filter after aacparse or changing 'adts' to 'raw' in the caps filter results in the stream playing correctly. An initial look suggests that this might be a result of the changes introduced by commit e0a5c07e8d404e72654e016fa0a6c88d573f51f1 (3/12/2013). In initial calls to gst_aac_parse_sink_getcaps, filter is NULL and so the caps of aacparse's src peer is returned, which in this case specifies stream-format=adts. However, I assume that this means the the upstream now has to output in adts format; but one reason for aacparse being in the pipeline is precisely because the upstream element can't output in adts and hence needs aacparse to convert from raw to adts. I'm guessing the reason it worked before this commit is that the template caps, which don't specificy a particular stream-format, were also appended to the returned caps. I guess this is related to the discussions in https://bugzilla.gnome.org/show_bug.cgi?id=705024, but I'm not sure I understand the issues there well enough to know what the right solution is.
When was it last known to work?
I rolled back to the commit which added the raw->ADTS functionality (b40bf67526189db009bf768c0541aefeb0d697ca on 13/8/2013), and that worked.
The problem is that aacparse in getcaps() does not properly handle that it can do conversions. It should adjust the stream-format field appropiately, e.g. in your case from "adts" to "{adts, raw}".
Adding that now
Created attachment 280850 [details] [review] aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW
Does this fix it for you?
No it doesn't, fixing
Created attachment 280857 [details] [review] aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW
With this negotiation works. But faad complains when trying to decode the adts stream, avdec_aac works fine though.
Yep, works for me as well using avdec_aac - thanks.
commit 638a700463a96b53dc92e9db4522ca861e5c72a1 Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Jul 16 17:18:59 2014 +0200 aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW https://bugzilla.gnome.org/show_bug.cgi?id=733190