Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-03-20 16:36:28 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-04-01 00:09:35 +0300
commitceae92cb291c2536a93482cdf3c1ae3f7330b924 (patch)
tree4c7f3b3ed021a88049c0a7f31eebbbbd46b00c3f /libavcodec/h264_slice.c
parent76cea1d2ce3f23e8131c8664086a1daf873ed694 (diff)
avcodec/h264_slice: Check input SPS in ff_h264_update_thread_context()
Fixes: crash Fixes: check_pkt.mp4 Found-by: Rafael Dutra <rafael.dutra@cispa.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 84b5710ab4..62f7a61aed 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -304,9 +304,8 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
if (dst == src)
return 0;
- // We can't fail if SPS isn't set at it breaks current skip_frame code
- //if (!h1->ps.sps)
- // return AVERROR_INVALIDDATA;
+ if (inited && !h1->ps.sps)
+ return AVERROR_INVALIDDATA;
if (inited &&
(h->width != h1->width ||