[FFmpeg-devel] [PATCH] Fix crash in libx264 when rc_eq is not set
Wed Aug 27 20:19:06 CEST 2008
On date Wednesday 2008-08-27 03:02:36 -0600, Loren Merritt encoded:
> On Tue, 26 Aug 2008, Stefano Sabatini wrote:
> > BTW what will happen when the eval functionality will be removed from
> > libx264? If the psz_rc_eq field will have been removed as well this
> > will break compilation (unless to update the ffmpeg code to comply
> > with latest libx264 versions).
> Yes. If you want to deal with ifdefs, go ahead. But I recommend to remove
> the line, and thus drop support for rc_eq with old x264 versions too.
Well... I could use the X264_BUILD to do something as
#if X264_BUILD < 61
x4->params.rc.psz_rc_eq = avctx->rc_eq;
av_log(avctx, AV_LOG_WARNING, "Ignoring the rc_eq set, using the libx264 default one\n");
the problem with this is that it won't work anyway if the *linked*
library isn't the same of the version of the header. Ideally if were
available a function such as x264_build() then the abovementioned
if/else could be performed run-time, lacking that I believe the best
approach is the simplest and the more robust, so I'm for eliminating
the rc_eq use, but to warn the user about that.
But again, I have no strong opinion on this, what I want mostly is to
fix the crash, so I'll apply what the libx264 maintainer (M?ns?) or
missing its opinion Michael will prefer.
FFmpeg = Freak and Frightening Minimal Proud Elegant Generator
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 664 bytes
Desc: not available
More information about the ffmpeg-devel