Hi, On Fri, Apr 15, 2016 at 2:39 PM, wm4 <nfx...@googlemail.com> wrote:
> On Fri, 15 Apr 2016 14:26:47 -0400 > "Ronald S. Bultje" <rsbul...@gmail.com> wrote: > > > --- > > libavfilter/vf_scale.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c > > index ac9d4c3..22bee96 100644 > > --- a/libavfilter/vf_scale.c > > +++ b/libavfilter/vf_scale.c > > @@ -237,9 +237,11 @@ static const int *parse_yuv_type(const char *s, > enum AVColorSpace colorspace) > > colorspace = AVCOL_SPC_SMPTE240M; > > } else if (s && (strstr(s, "bt601") || strstr(s, "bt470") || > strstr(s, "smpte170m"))) { > > colorspace = AVCOL_SPC_BT470BG; > > + } else if (s && strstr(s, "bt2020")) { > > + colorspace = AVCOL_SPC_BT2020_NCL; > > } > > > > - if (colorspace < 1 || colorspace > 7) { > > + if (colorspace < 1 || colorspace > 10 || colorspace == 8) { > > colorspace = AVCOL_SPC_BT470BG; > > } > > > > What's with those magic numbers? Why is it using strstr for string > parsing? Dunno, just following the style that existed. I'm assuming the string parsing precedes AVOptions enums? I can port that too, sure. Ronald _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel