-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace deprecated FFmpeg API #1137
Conversation
Fixes FTBFS with ffmpeg-2.9; compatible with ffmpeg-2.8. Author: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803850
This will bring up the discussion about old version support. I am all for moving to the latest version we can, but keeping in mind we would like users to be able to use new versions of Zoneminder on LTS distros. I think we do a version check on av_frame_free, to support older versions, but AVPixelFormat gets replaced. |
@@ -188,7 +188,7 @@ int FfmpegCamera::Capture( Image &image ) | |||
#if HAVE_LIBSWSCALE | |||
if(mConvertContext == NULL) { | |||
if(config.cpu_extensions && sseversion >= 20) { | |||
mConvertContext = sws_getContext( mCodecContext->width, mCodecContext->height, mCodecContext->pix_fmt, width, height, imagePixFormat, SWS_BICUBIC | SWS_CPU_CAPS_SSE2, NULL, NULL, NULL ); | |||
mConvertContext = sws_getContext( mCodecContext->width, mCodecContext->height, mCodecContext->pix_fmt, width, height, imagePixFormat, SWS_BICUBIC, NULL, NULL, NULL ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check out SWS_CPU_CAPS_SSE2, but there is 3 of these changes that seem to make the if and else statement identical.
I'd much appreciate if someone could take this off my hands. I'm no expert and I merely forwarded patch that Andreas wrote. Also I have no time for testing or going deep into this matter... |
Also why do you need to care for old Ubuntu? Perhaps I've forgotten ZM support policy but Ubuntu leaches everything from Debian so IMHO there is no need to do anything special about Ubuntu... |
@onlyjob I knew I would get a bite if I mentioned Ubuntu, only an example of old release that is still supported and could be running in production. I updated that to 14.04 in comment as the most recent LTS. No doubt CentOS will come up as well with 6 supported until 2020. And yes we know Debian is the best and only distro ;-) |
You know my obsession so well, Steve. ;-) |
I am certainly in favor of merging this in some form, just not in the form it is in now, not at this time. I rely on the RPMFusion repo for ffmpeg rpm's for Redhat based distros, and the version currently in the repo is 0.10 for CentOS 6. Yeah, 0.10. That's not a typo, and I agree. It is extremely old and should be updated. I can try and backport a newer ffmpeg package for CentOS 6, but if it turns into dependency hell, we will need to fall back to maintaining the old code path... at least for this next release. I'll need more time if it turns into that. |
Off topic but found this that might help you. https://gist.github.com/gboudreau/f24aed76b4cc91bfb2c1 I will start having a look at the conditionals, at least I already did the work to identify versions. Well with this one I think I have them all. |
Update to #1137 for backward compatibility.
Fixes FTBFS with ffmpeg-2.9; compatible with ffmpeg-2.8.
Author: Andreas Cadhalpun Andreas.Cadhalpun@googlemail.com
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803850