Browse Source

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>
master
Michael Niedermayer 4 years ago
parent
commit
ceae92cb29
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      libavcodec/h264_slice.c

+ 2
- 3
libavcodec/h264_slice.c View File

@@ -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 ||


Loading…
Cancel
Save