1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Michael Niedermayer 2014-07-15 21:43:30 +02:00
parent 0fc2045d5f
commit 880dbe43ca

View File

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