Add an AVSTREAM_PARSE_FULL_ONCE parsing mode to parse headers and combine packets once and only once.

Originally committed as revision 23332 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Alex Converse
2010-05-26 04:20:32 +00:00
parent 9069b7d35f
commit 74a6df59e3
4 changed files with 9 additions and 2 deletions

View File

@ -1117,6 +1117,8 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
st->need_parsing = AVSTREAM_PARSE_NONE;
}else if(st->need_parsing == AVSTREAM_PARSE_HEADERS){
st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
}else if(st->need_parsing == AVSTREAM_PARSE_FULL_ONCE){
st->parser->flags |= PARSER_FLAG_ONCE;
}
if(st->parser && (s->iformat->flags & AVFMT_GENERIC_INDEX)){
st->parser->next_frame_offset=