diff --git a/h264_nal.c b/h264_nal.c index 0b883f8..82c7f12 100755 --- a/h264_nal.c +++ b/h264_nal.c @@ -188,11 +188,9 @@ int find_nal_unit(uint8_t* buf, int size, int* nal_start, int* nal_end) int rbsp_to_nal(const uint8_t* rbsp_buf, const int* rbsp_size, uint8_t* nal_buf, int* nal_size) { int i; - int j = 1; + int j = 0; int count = 0; - if (*nal_size > 0) { nal_buf[0] = 0x00; } // zero out first byte since we start writing from second byte - for ( i = 0; i < *rbsp_size ; ) { if ( j >= *nal_size )