changeset 4828:58f1856608f6 libavcodec

scenario: A properly coded frame is followed by an end of sequence NAL unit, i.e. the four bytes 00 00 01 0a. When decode_nal() decodes the end of sequence NAL unit, it returns with dst_length == 0. The original code leads to a return -1 which discards the current properly decoded frame. patch by Reinhard Nissl, rnissl gmx de
author diego
date Mon, 09 Apr 2007 12:55:07 +0000
parents b3ee9a1526b0
children e3161603a048
files h264.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Sun Apr 08 20:24:16 2007 +0000
+++ b/h264.c	Mon Apr 09 12:55:07 2007 +0000
@@ -8144,7 +8144,7 @@
       }
 
         ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index);
-        if (ptr==NULL || dst_length <= 0){
+        if (ptr==NULL || dst_length < 0){
             return -1;
         }
         while(ptr[dst_length - 1] == 0 && dst_length > 1)