[FFmpeg-cvslog] avcodec/hevc: treat current_sps like sps_list
Michael Niedermayer
git at videolan.org
Tue Aug 5 04:58:07 CEST 2014
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Tue Jul 15 21:43:30 2014 +0200| [815d3225e32bc335cecd333773d1839d63b76abf] | 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 <michaelni at gmx.at>
(cherry picked from commit 880dbe43ca71982ecdfe1c73446137d6b2fd24d5)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=815d3225e32bc335cecd333773d1839d63b76abf
---
libavcodec/hevc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index fd0309a..5f719c8 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list