Commit 0e5a4769 authored by James Almer's avatar James Almer

Merge commit 'cb167f29'

* commit 'cb167f29':
  h264_refs: validate the SPS pointer in ff_h264_execute_ref_pic_marking()
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 0b30cb8d cb167f29
...@@ -614,6 +614,12 @@ int ff_h264_execute_ref_pic_marking(H264Context *h) ...@@ -614,6 +614,12 @@ int ff_h264_execute_ref_pic_marking(H264Context *h)
int current_ref_assigned = 0, err = 0; int current_ref_assigned = 0, err = 0;
H264Picture *av_uninit(pic); 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) if (!h->explicit_ref_marking)
generate_sliding_window_mmcos(h); generate_sliding_window_mmcos(h);
mmco_count = h->nb_mmco; mmco_count = h->nb_mmco;
...@@ -817,6 +823,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h) ...@@ -817,6 +823,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h)
h->frame_recovered |= FRAME_RECOVERED_SEI; h->frame_recovered |= FRAME_RECOVERED_SEI;
} }
out:
return (h->avctx->err_recognition & AV_EF_EXPLODE) ? err : 0; return (h->avctx->err_recognition & AV_EF_EXPLODE) ? err : 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment