Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-15 23:43:04 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-07-15 23:49:56 +0400
commit0fc2045d5f4eab35d943a79c3d965a2f31361f48 (patch)
treec5b6a2b44c6162cab3676b15b8f03d3ddf790433
parent95144729045fe00130f6b3547c04d40d1b48b157 (diff)
avcodec/hevc_ps: prevent stale pointer in malloc failure case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/hevc_ps.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index ba166cb16d..98d987dcf4 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -1016,6 +1016,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
if (s->sps_list[sps_id] && s->sps == (HEVCSPS*)s->sps_list[sps_id]->data) {
av_buffer_unref(&s->current_sps);
s->current_sps = av_buffer_ref(s->sps_list[sps_id]);
+ if (!s->current_sps)
+ s->sps = NULL;
}
av_buffer_unref(&s->sps_list[sps_id]);
s->sps_list[sps_id] = sps_buf;