[FFmpeg-cvslog] avcodec/h264_slice: Check input SPS in ff_h264_update_thread_context()
Michael Niedermayer
git at videolan.org
Thu Apr 1 00:10:50 EEST 2021
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Mar 20 14:36:28 2021 +0100| [ceae92cb291c2536a93482cdf3c1ae3f7330b924] | committer: Michael Niedermayer
avcodec/h264_slice: Check input SPS in ff_h264_update_thread_context()
Fixes: crash
Fixes: check_pkt.mp4
Found-by: Rafael Dutra <rafael.dutra at cispa.de>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ceae92cb291c2536a93482cdf3c1ae3f7330b924
---
libavcodec/h264_slice.c | 5 ++---
1 file 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 ||
More information about the ffmpeg-cvslog
mailing list