a52: not compatible with recent avcodec
GitHub issues - opened
github at alsa-project.org
Sun Jun 6 15:59:31 CEST 2021
alsa-project/alsa-plugins issue #22 was opened from manio:
Hi!
Current a52 plugin is not compatible with recent changes in the FFmpeg lib.
The symptom is that using newest FFmpeg the a52 plugin produces silent in the speakers. During the weekend I was able to bisect the problem and shed some light on this, and here is what I found out:
1. The a52 plugin is working fine before commit: https://github.com/FFmpeg/FFmpeg/commit/93016f5d1d280f9cb7856883af287fa66affc04c
2. Above commit is wrapping avcodec_encode_audio2(), which a52 plugin is using, into new API internally inside the avcodec
3. All applications should move to new so called ["avcodec_send_frame() API"](https://ffmpeg.org/doxygen/3.4/group__lavc__encdec.html)
4. After the commit in point 1 the a52 output plugin is not working anymore
I was asking the commit author @jamrial about the commit and he said that the main culprit could rather be the commit:
https://github.com/FFmpeg/FFmpeg/commit/2d85e6e7230406e33e61d903b9c29ab562e158bd
which is changing the S16 to S32 for ac3_fixed encoder while the a52 plugin _"is ignoring the kind of format the encoder takes as input (Starting from the aforementioned commit, ac3_fixed takes S32 planar audio), and unconditionally feeding it S16 planar audio."_
I was trying to change the a52 from S16 to S32 but I think some more work is needed on this...
I was also try to change the do_encode() function from avcodec_encode_audio2 to avcodec_send_frame() with no luck...
Issue URL : https://github.com/alsa-project/alsa-plugins/issues/22
Repository URL: https://github.com/alsa-project/alsa-plugins
More information about the Alsa-devel
mailing list