[FFmpeg-devel] [PATCH] Fix crash in libx264 when rc_eq is not set
Stefano Sabatini
stefano.sabatini-lala
Mon Aug 25 17:19:48 CEST 2008
On date Wednesday 2008-08-20 14:07:40 +0200, Stefano Sabatini encoded:
> Hi,
>
> check this thread:
> http://thread.gmane.org/gmane.comp.video.ffmpeg.user/17920
>
> The regression has been caused by r14788, rc_eq default value isn't
> set in avcodec_get_context_defaults2(), while libx64 requires it to be
> explicitely set.
>
> This results libx264 encoding to crash when rc_eq is not explicitely
> set.
>
> Attached patch fixes the issue (but introduce a constness signature
> related warning).
>
> BTW I'm not satisfied by the way the default value of rc_eq is set as
> a consequence of r14788, having the default value set in three
> different places doesn't look that good.
>
> Regards.
> --
> FFmpeg = Fast & Forgiving Multimedia Picky Ecletic Guru
> Index: libavcodec/libx264.c
> ===================================================================
> --- libavcodec/libx264.c (revision 14863)
> +++ libavcodec/libx264.c (working copy)
> @@ -253,7 +253,7 @@
> x4->params.rc.f_ip_factor = 1/fabs(avctx->i_quant_factor);
> x4->params.rc.f_pb_factor = avctx->b_quant_factor;
> x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
> - x4->params.rc.psz_rc_eq = avctx->rc_eq;
> + x4->params.rc.psz_rc_eq = avctx->rc_eq ? avctx->rc_eq : "tex^qComp";
>
> x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
> x4->params.i_log_level = X264_LOG_DEBUG;
Ping?
A lot of people are complainig about this on ffmpeg-user, could
someone review it?
Regards.
--
FFmpeg = Foolish and Faboulous Multimedia Patchable Explosive Genius
More information about the ffmpeg-devel
mailing list