h264 complete frames parsing support

Originally committed as revision 8398 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2007-03-14 11:12:02 +00:00
parent 08cb195020
commit 1153be3be1

View File

@ -8048,6 +8048,9 @@ static int h264_parse(AVCodecParserContext *s,
ParseContext *pc = &h->s.parse_context; ParseContext *pc = &h->s.parse_context;
int next; int next;
if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
next= buf_size;
}else{
next= find_frame_end(h, buf, buf_size); next= find_frame_end(h, buf, buf_size);
if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) { if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) {
@ -8059,6 +8062,7 @@ static int h264_parse(AVCodecParserContext *s,
if(next<0){ if(next<0){
find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state
} }
}
*poutbuf = (uint8_t *)buf; *poutbuf = (uint8_t *)buf;
*poutbuf_size = buf_size; *poutbuf_size = buf_size;