diff options
author | James Almer <jamrial@gmail.com> | 2017-10-30 20:40:28 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-10-30 20:40:28 -0300 |
commit | 0e5a47693c4b2e77b3951c209e842b8a72b7b36b (patch) | |
tree | 30f45da66052924292afea3e60fe3fdbfdd712c8 /libavcodec/h264_refs.c | |
parent | 0b30cb8dae5e7edb2a5f35900547321499c217f1 (diff) | |
parent | cb167f2947f1a2c446bd8db196d0e64ef4a6d06b (diff) | |
download | ffmpeg-0e5a47693c4b2e77b3951c209e842b8a72b7b36b.tar.gz |
Merge commit 'cb167f2947f1a2c446bd8db196d0e64ef4a6d06b'
* commit 'cb167f2947f1a2c446bd8db196d0e64ef4a6d06b':
h264_refs: validate the SPS pointer in ff_h264_execute_ref_pic_marking()
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/h264_refs.c')
-rw-r--r-- | libavcodec/h264_refs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index af70829594..976044ce2c 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -614,6 +614,12 @@ int ff_h264_execute_ref_pic_marking(H264Context *h) int current_ref_assigned = 0, err = 0; H264Picture *av_uninit(pic); + if (!h->ps.sps) { + av_log(h->avctx, AV_LOG_ERROR, "SPS is unset\n"); + err = AVERROR_INVALIDDATA; + goto out; + } + if (!h->explicit_ref_marking) generate_sliding_window_mmcos(h); mmco_count = h->nb_mmco; @@ -817,6 +823,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h) h->frame_recovered |= FRAME_RECOVERED_SEI; } +out: return (h->avctx->err_recognition & AV_EF_EXPLODE) ? err : 0; } |