[FFmpeg-devel] [PATCH]lavc/h264_ps: Check chroma_location limits
Clément Bœsch
u at pkh.me
Fri Mar 24 16:05:09 EET 2017
On Fri, Mar 24, 2017 at 10:40:21AM +0100, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch fixes #6255.
>
> Please comment, Carl Eugen
> From 1c249440c62271565be12112f321ad9aa6a922fb Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos at 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;
if (av_chroma_location_name(...)) ...
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170324/5fe50e7b/attachment.sig>
More information about the ffmpeg-devel
mailing list