Mercurial > libavcodec.hg
comparison h264.c @ 3341:bd7a496e44c9 libavcodec
h264: accept rbsp_trailing longer than 1 byte
author | lorenm |
---|---|
date | Mon, 12 Jun 2006 09:30:17 +0000 |
parents | 8dc886b9568a |
children | 69901769c811 |
comparison
equal
deleted
inserted
replaced
3340:4c2eba93c584 | 3341:bd7a496e44c9 |
---|---|
7971 | 7971 |
7972 buf_index+=3; | 7972 buf_index+=3; |
7973 } | 7973 } |
7974 | 7974 |
7975 ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index); | 7975 ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index); |
7976 if(ptr[dst_length - 1] == 0) dst_length--; | 7976 while(ptr[dst_length - 1] == 0 && dst_length > 1) |
7977 dst_length--; | |
7977 bit_length= 8*dst_length - decode_rbsp_trailing(ptr + dst_length - 1); | 7978 bit_length= 8*dst_length - decode_rbsp_trailing(ptr + dst_length - 1); |
7978 | 7979 |
7979 if(s->avctx->debug&FF_DEBUG_STARTCODE){ | 7980 if(s->avctx->debug&FF_DEBUG_STARTCODE){ |
7980 av_log(h->s.avctx, AV_LOG_DEBUG, "NAL %d at %d/%d length %d\n", h->nal_unit_type, buf_index, buf_size, dst_length); | 7981 av_log(h->s.avctx, AV_LOG_DEBUG, "NAL %d at %d/%d length %d\n", h->nal_unit_type, buf_index, buf_size, dst_length); |
7981 } | 7982 } |