changeset 2401:46898a9fd6dc libavcodec

Fix avc1 if there is nore than one nal per mov frame
author rtognimp
date Thu, 30 Dec 2004 18:05:54 +0000
parents 17ec73c65748
children f9d4e1eddbc5
files h264.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);