projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7b286e
)
h264: accept rbsp_trailing longer than 1 byte
author
Loren Merritt
<lorenm@u.washington.edu>
Mon, 12 Jun 2006 09:30:17 +0000
(09:30 +0000)
committer
Loren Merritt
<lorenm@u.washington.edu>
Mon, 12 Jun 2006 09:30:17 +0000
(09:30 +0000)
Originally committed as revision 5467 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/h264.c
patch
|
blob
|
history
diff --git
a/libavcodec/h264.c
b/libavcodec/h264.c
index
99172a1
..
2047d5f
100644
(file)
--- a/
libavcodec/h264.c
+++ b/
libavcodec/h264.c
@@
-7973,7
+7973,8
@@
static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){
}
ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index);
- if(ptr[dst_length - 1] == 0) dst_length--;
+ while(ptr[dst_length - 1] == 0 && dst_length > 1)
+ dst_length--;
bit_length= 8*dst_length - decode_rbsp_trailing(ptr + dst_length - 1);
if(s->avctx->debug&FF_DEBUG_STARTCODE){