Commit 880dbe43 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/hevc: treat current_sps like sps_list

This simplifies the management of current_sps
Fixes Ticket3458
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0fc2045d
......@@ -3291,9 +3291,12 @@ static int hevc_update_thread_context(AVCodecContext *dst,
}
}
if (s->current_sps && s->sps == (HEVCSPS*)s->current_sps->data)
s->sps = NULL;
av_buffer_unref(&s->current_sps);
if (s0->current_sps) {
s->current_sps = av_buffer_ref(s0->current_sps);
if (!s->current_sps)
return AVERROR(ENOMEM);
}
if (s->sps != s0->sps)
ret = set_sps(s, s0->sps);
......
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