On Fri, 24 Mar 2017 11:23:44 +0100 Carl Eugen Hoyos <ceffm...@gmail.com> wrote:
> 2017-03-24 10:59 GMT+01:00 wm4 <nfx...@googlemail.com>: > > On Fri, 24 Mar 2017 10:40:21 +0100 > > Carl Eugen Hoyos <ceho...@ag.or.at> wrote: > > > >> From 1c249440c62271565be12112f321ad9aa6a922fb Mon Sep 17 00:00:00 2001 > >> From: Carl Eugen Hoyos <ceho...@ag.or.at> > >> Date: Fri, 24 Mar 2017 10:38:22 +0100 > >> Subject: [PATCH] lavc/h264_ps: Check that chroma_location is within limits. > >> > >> Fixes ticket #6255. > >> --- > >> libavcodec/h264_ps.c | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c > >> index b78ad25..55e6a6e 100644 > >> --- a/libavcodec/h264_ps.c > >> +++ b/libavcodec/h264_ps.c > >> @@ -181,6 +181,8 @@ static inline int decode_vui_parameters(GetBitContext > >> *gb, AVCodecContext *avctx > >> if (get_bits1(gb)) { > >> /* chroma_sample_location_type_top_field */ > >> avctx->chroma_sample_location = get_ue_golomb(gb) + 1; > >> + if (avctx->chroma_sample_location >= AVCHROMA_LOC_NB) > >> + avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; > > > > AVCHROMA_LOC_NB is not part of the libavutil ABI, so libavcodec can in > > theory not use it. > > I suspect you misread this rule (we cannot make _NB smaller), in any case > please look a few lines up from the patch, there are several similar > cases there. Quoting the source code: AVCHROMA_LOC_NB ///< Not part of ABI Seems pretty clear. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel