changeset 4664:f7c444dc3b04 libavcodec

h264 complete frames parsing support
author bcoudurier
date Wed, 14 Mar 2007 11:12:02 +0000
parents 48de02206807
children 9b35cbf0b25b
files h264.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Wed Mar 14 01:59:53 2007 +0000
+++ b/h264.c	Wed Mar 14 11:12:02 2007 +0000
@@ -8048,6 +8048,9 @@
     ParseContext *pc = &h->s.parse_context;
     int next;
 
+    if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
+        next= buf_size;
+    }else{
     next= find_frame_end(h, buf, buf_size);
 
     if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) {
@@ -8059,6 +8062,7 @@
     if(next<0){
         find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state
     }
+    }
 
     *poutbuf = (uint8_t *)buf;
     *poutbuf_size = buf_size;