avcodec/hevc: treat current_sps like sps_list
This simplifies the management of current_sps
Fixes Ticket3458
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 880dbe43ca)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
51dd23c448
commit
815d3225e3
1 changed files with 5 additions and 2 deletions
|
|
@ -2941,9 +2941,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue