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:
d6f9210
)
h265_parse: skip zero sized NAL units
author
Hendrik Leppkes
<h.leppkes@gmail.com>
Sat, 7 May 2016 14:28:39 +0000
(16:28 +0200)
committer
Derek Buitenhuis
<derek.buitenhuis@gmail.com>
Sat, 7 May 2016 20:14:23 +0000
(21:14 +0100)
Avoids extra error checks later on and/or invalid reads.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libavcodec/h2645_parse.c
patch
|
blob
|
history
diff --git
a/libavcodec/h2645_parse.c
b/libavcodec/h2645_parse.c
index
aac9f99
..
62d0447
100644
(file)
--- a/
libavcodec/h2645_parse.c
+++ b/
libavcodec/h2645_parse.c
@@
-333,7
+333,7
@@
int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
ret = hevc_parse_nal_header(nal, logctx);
else
ret = h264_parse_nal_header(nal, logctx);
- if (ret <= 0) {
+ if (ret <= 0
|| nal->size <= 0
) {
if (ret < 0) {
av_log(logctx, AV_LOG_ERROR, "Invalid NAL unit %d, skipping.\n",
nal->type);