[MPlayer-dev-eng] [PATCH] CQMs in x264

Loren Merritt lorenm at u.washington.edu
Tue Jul 12 17:34:13 CEST 2005


On Tue, 12 Jul 2005, Robert Swain wrote:

> I have written a small patch to add a CQM option to x264 in MEncoder.

> + else if( strncasecmp( cqm, "file", 4 ) == 0 )
> + {
> +     mod->param.i_cqm_preset = X264_CQM_CUSTOM;
> +     mod->param.psz_cqm_file = strchr( cqm, ',' ) + 1;
> + }

will lead to a segfault if cqm doesn't contain a comma.

+ else if( strncasecmp( cqm, "file,", 5 ) == 0 )
+ {
+     mod->param.i_cqm_preset = X264_CQM_CUSTOM;
+     mod->param.psz_cqm_file = cqm + 5;
+ }

--Loren Merritt




More information about the MPlayer-dev-eng mailing list