summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Öman <andreas@olebyn.nu>2007-06-18 08:48:26 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2007-06-18 08:48:26 +0000
commit1c48415bb9f628d4f8e67e007309fb6ffe3735e6 (patch)
tree5d1dd798910e0033339fdf3be39f9bd25f452255 /libavcodec
parentb33ece1634793c1fb65508891fbdb96c201f5f75 (diff)
indentation
patch by Andreas Öman: [andreas olebyn nu] Originally committed as revision 9360 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 8b499df6b3..9930624824 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -7683,32 +7683,32 @@ static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){
uint8_t *ptr;
int i, nalsize = 0;
- if(h->is_avc) {
- if(buf_index >= buf_size) break;
- nalsize = 0;
- for(i = 0; i < h->nal_length_size; i++)
- nalsize = (nalsize << 8) | buf[buf_index++];
- if(nalsize <= 1 || (nalsize+buf_index > buf_size)){
- if(nalsize == 1){
- buf_index++;
- continue;
- }else{
- av_log(h->s.avctx, AV_LOG_ERROR, "AVC: nal size %d\n", nalsize);
- break;
+ if(h->is_avc) {
+ if(buf_index >= buf_size) break;
+ nalsize = 0;
+ for(i = 0; i < h->nal_length_size; i++)
+ nalsize = (nalsize << 8) | buf[buf_index++];
+ if(nalsize <= 1 || (nalsize+buf_index > buf_size)){
+ if(nalsize == 1){
+ buf_index++;
+ continue;
+ }else{
+ av_log(h->s.avctx, AV_LOG_ERROR, "AVC: nal size %d\n", nalsize);
+ break;
+ }
+ }
+ } else {
+ // start code prefix search
+ for(; buf_index + 3 < buf_size; buf_index++){
+ // This should always succeed in the first iteration.
+ if(buf[buf_index] == 0 && buf[buf_index+1] == 0 && buf[buf_index+2] == 1)
+ break;
}
- }
- } else {
- // start code prefix search
- for(; buf_index + 3 < buf_size; buf_index++){
- // This should always succeed in the first iteration.
- if(buf[buf_index] == 0 && buf[buf_index+1] == 0 && buf[buf_index+2] == 1)
- break;
- }
- if(buf_index+3 >= buf_size) break;
+ if(buf_index+3 >= buf_size) break;
- buf_index+=3;
- }
+ buf_index+=3;
+ }
ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index);
if (ptr==NULL || dst_length < 0){