# HG changeset patch # User rtognimp # Date 1104429954 0 # Node ID 46898a9fd6dce9c1b3eb6577980a426f3807c919 # Parent 17ec73c657487a0aba56214186c1f5b8c8f2b574 Fix avc1 if there is nore than one nal per mov frame diff -r 17ec73c65748 -r 46898a9fd6dc h264.c --- a/h264.c Thu Dec 30 14:48:01 2004 +0000 +++ b/h264.c Thu Dec 30 18:05:54 2004 +0000 @@ -5862,7 +5862,7 @@ buf_index+=3; } - ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, buf_size - buf_index); + 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--; bit_length= 8*dst_length - decode_rbsp_trailing(ptr + dst_length - 1);