OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5302fa5
)
avcodec/hevc_ps: prevent stale pointer in malloc failure case
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 15 Jul 2014 19:43:04 +0000
(21:43 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 15 Jul 2014 20:19:25 +0000
(22:19 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit
0fc2045d5f4eab35d943a79c3d965a2f31361f48
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit
cf99ce9a7744763ea2950f45e7ffe18af8f4e0f5
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hevc_ps.c
patch
|
blob
|
history
diff --git
a/libavcodec/hevc_ps.c
b/libavcodec/hevc_ps.c
index
99ac8ef
..
955a7af
100644
(file)
--- a/
libavcodec/hevc_ps.c
+++ b/
libavcodec/hevc_ps.c
@@
-937,6
+937,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;