ffmpeg | branch: release/2.1 | Michael Niedermayer <michae...@gmx.at> | Tue Jul 15 21:43:30 2014 +0200| [b7638af9425a721459d51fe99858a1dee7080070] | committer: Michael Niedermayer
avcodec/hevc: treat current_sps like sps_list This simplifies the management of current_sps Fixes Ticket3458 Signed-off-by: Michael Niedermayer <michae...@gmx.at> (cherry picked from commit 880dbe43ca71982ecdfe1c73446137d6b2fd24d5) Signed-off-by: Michael Niedermayer <michae...@gmx.at> (cherry picked from commit 30b6e9377d3b0b1341147d8484fce24301e7b8a0) Signed-off-by: Michael Niedermayer <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7638af9425a721459d51fe99858a1dee7080070 --- libavcodec/hevc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index e0f3528..9633511 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2815,9 +2815,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); + } s->seq_decode = s0->seq_decode; s->seq_output = s0->seq_output; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog