[FFmpeg-devel] [PATCH]lavc/hevc_ps: Be less strict on sps conformance by default.

Michael Niedermayer michael at niedermayer.cc
Thu Aug 31 03:25:23 EEST 2017


On Wed, Aug 30, 2017 at 12:05:32PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch allows users to control the sps conformance
> requirement: It allows to revert the fix for ticket #4035, so faulty
> streams can be ignored.
> Also fixes a user-provided sample.
> 
> Please comment, Carl Eugen

>  hevc_ps.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 46c5772fae6f32bb580246c84ed42e4070834c77  0001-lavc-hevc_ps-Be-less-strict-on-sps-conformance-by-de.patch
> From d2a4241f52c7e5b4b5226f7aed237e7448815b77 Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <ceffmpeg at gmail.com>
> Date: Wed, 30 Aug 2017 11:55:15 +0200
> Subject: [PATCH] lavc/hevc_ps: Be less strict on sps conformance by default.
> 
> ---
>  libavcodec/hevc_ps.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
> index 37eae22..6d12d90 100644
> --- a/libavcodec/hevc_ps.c
> +++ b/libavcodec/hevc_ps.c
> @@ -1187,7 +1187,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
>      if (get_bits_left(gb) < 0) {
>          av_log(avctx, AV_LOG_ERROR,
>                 "Overread SPS by %d bits\n", -get_bits_left(gb));
> -        return AVERROR_INVALIDDATA;
> +        if (avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT)
> +            return AVERROR_INVALIDDATA;

This is likely not correct

when get_bits_left becomes smaller than 0 then parsing went wrong
prior


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170831/92537637/attachment.sig>


More information about the ffmpeg-devel mailing list