Mercurial > libavformat.hg
changeset 6059:65b0ea69d9af libavformat
Add an AVSTREAM_PARSE_FULL_ONCE parsing mode to parse headers and combine packets once and only once.
author | alexc |
---|---|
date | Wed, 26 May 2010 04:20:32 +0000 |
parents | 5d4acf33261d |
children | 8d92fb0a1a24 |
files | avformat.h utils.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/avformat.h Tue May 25 22:55:12 2010 +0000 +++ b/avformat.h Wed May 26 04:20:32 2010 +0000 @@ -22,7 +22,7 @@ #define AVFORMAT_AVFORMAT_H #define LIBAVFORMAT_VERSION_MAJOR 52 -#define LIBAVFORMAT_VERSION_MINOR 65 +#define LIBAVFORMAT_VERSION_MINOR 66 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ @@ -377,6 +377,7 @@ AVSTREAM_PARSE_FULL, /**< full parsing and repack */ AVSTREAM_PARSE_HEADERS, /**< Only parse headers, do not repack. */ AVSTREAM_PARSE_TIMESTAMPS, /**< full parsing and interpolation of timestamps for frames not starting on a packet boundary */ + AVSTREAM_PARSE_FULL_ONCE, /**< full parsing and repack of the first frame only, only implemented for H.264 currently */ }; typedef struct AVIndexEntry {
--- a/utils.c Tue May 25 22:55:12 2010 +0000 +++ b/utils.c Wed May 26 04:20:32 2010 +0000 @@ -1117,6 +1117,8 @@ 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=