diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-15 21:43:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-15 21:49:56 +0200 |
commit | 880dbe43ca71982ecdfe1c73446137d6b2fd24d5 (patch) | |
tree | 5cfd9e3c1d1fd7f2103fcee210385462dbc2b5d9 | |
parent | 0fc2045d5f4eab35d943a79c3d965a2f31361f48 (diff) | |
download | ffmpeg-880dbe43ca71982ecdfe1c73446137d6b2fd24d5.tar.gz |
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>
-rw-r--r-- | libavcodec/hevc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 17f72524e2..cccd07ac83 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -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); |