GNOME Bugzilla – Bug 778283
gst-libav 1.8.3 loses encoders/decoders vs 1.8.2 when built with system ffmpeg 2.8.10
Last modified: 2018-01-15 11:10:59 UTC
Someone reported this on Launchpad at http://pad.lv/1661842 The decoders for wma/tta/ape/others are missing, as well as some encoders too. Will attach the diff. It was introduced with 70c281b545a383d45ec2fca296ce2387e1eac59e. The problem is that in 2.8.10, we have "AV_CODEC_ID_PCM_S16BE_PLANAR = MKBETAG('P','S','P',16)" - with 3.2 it changed to a different (sequential) value, so things are okay there. It's not safe to do range comparisons on it for 2.8. It's this part: + /* no quasi codecs, please */ + if […] + (in_plugin->id >= AV_CODEC_ID_PCM_S8_PLANAR && + in_plugin->id <= AV_CODEC_ID_PCM_S16BE_PLANAR)) { That causes these to be thrown out. Any suggestion for how to fix? Maybe just don't do this on old libavcodec?
Created attachment 345110 [details] [review] decoder changes
Created attachment 345111 [details] encoder changes
Created attachment 345112 [details] decoder changes
Do you want to provide a patch (only against 1.8 branch)? Just list the values in question explicitly instead of checking the range.
Created attachment 345218 [details] [review] Like this? I moved to enumerating them for < 3.0. Don't do range comparisons against AV_CODEC_ID_PCM_S16BE_PLANAR for < 3.0 Prior to ffmpeg 3.0, this constant had a specified value. Excluding all plugins in a range bounded by this value was throwing out plugins that we want to keep. Instead switch to enumerating the values to exclude, for < 3.0.
Created attachment 345220 [details] [review] avaudenc/dec: Don't do range comparisons against AV_CODEC_ID_PCM_S16BE_PLANAR for < 3.0 Prior to ffmpeg 3.0, this constant had a specified value. Excluding all plugins in a range bounded by this value was throwing out plugins that we want to keep. Instead switch to enumerating the values to exclude, for < 3.0.
Yes, except that you broke the compilation with the included ffmpeg version. I fixed that. Attachment 345220 [details] pushed as e1b4116 - avaudenc/dec: Don't do range comparisons against AV_CODEC_ID_PCM_S16BE_PLANAR for < 3.0
1.10 requires 3.0, so this is only going to be in 1.8
Thanks, and sorry for that
No problem, sorry for letting that break 1.8.3 and causing you to have a broken version in the xenial updates
Btw, if you build with a different ffmpeg release series (i.e. 2.8/2.9 while the release ships with 3.0, or 3.0 while the release ships with 3.1) than included in the release, I'd recommend that you do some more testing. We don't really support building with different ffmpeg versions.
ping?
(In reply to Tim-Philipp Müller from comment #12) > ping? I think this is RESOLVED FIXED? Reopen if I'm missing something.
Ah yes, sorry. Didn't see that the patch was committed.