Drop RBSP padding NAL units from h264 streams.
This commit is contained in:
parent
e7a259db42
commit
5946b6ea85
1 changed files with 9 additions and 1 deletions
10
parsers.c
10
parsers.c
|
@ -615,9 +615,17 @@ parse_h264(th_transport_t *t, th_stream_t *st, size_t len,
|
|||
uint8_t *buf = st->st_buffer + sc_offset;
|
||||
uint32_t sc = st->st_startcode;
|
||||
int64_t d;
|
||||
int l2, pkttype;
|
||||
int l2, pkttype, l;
|
||||
bitstream_t bs;
|
||||
|
||||
if(sc == 0x10c) {
|
||||
/* RBSP padding, we don't want this */
|
||||
|
||||
l = len - sc_offset;
|
||||
memcpy(buf, buf + l, 4); /* Move down new start code */
|
||||
st->st_buffer_ptr -= l; /* Drop buffer */
|
||||
}
|
||||
|
||||
if(sc >= 0x000001e0 && sc <= 0x000001ef) {
|
||||
/* System start codes for video */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue