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
From d2a4241f52c7e5b4b5226f7aed237e7448815b77 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffm...@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;
     }
 
     return 0;
-- 
1.7.10.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to