Ticket #2342 (closed defect: fixed)
ebur128 filter output seems to break format auto negotiation
| Reported by: | cus | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avfilter |
| Version: | git-master | Keywords: | ebur128 |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
Chaining the output of the ebur128 (audio) filter causes broken output.
How to reproduce:
ffmpeg -i stereo.mp3 -af ebur128,aformat=channel_layouts=mono dummy.wav
Clément Bœsch provided a patch, but it is not clear why it fixes the issue.
http://ffmpeg.org/pipermail/ffmpeg-devel/2013-February/139526.html
Change History
comment:1 Changed 2 months ago by Cigaes
- Status changed from new to open
- Reproduced by developer set
comment:2 Changed 2 months ago by ubitux
- Status changed from open to closed
- Resolution set to fixed
Fixed in 9efcfbed9dd64679145f5f39d9a812dfeea97172. Thanks Nicolas for the details, and sorry for the delay.
comment:3 Changed 2 months ago by ubitux
- Status changed from closed to reopened
- Resolution fixed deleted
This "fix" was nothing but wrong, shame on me. I thought I understood the issue, but it doesn't seem to be the case. I'll investigate, but something looks horribly broken, and I think multiple problems are surfacing here...
Note: See
TracTickets for help on using
tickets.



The problem is that ebur128's query_formats() function sets the supported channel layouts (and formats) separately on its input and its audio output. That means lavfi is allowed to select them independently, and that ebur128 is expected to convert somehow. That is not what happens: ebur128 assumes that its input and audio output have the same format and channel layout; for that, it is supposed to set the supported formats and layouts together.
That is exactly what the fallback query_formats() code does, therefore just removing the code fixes the bug.