summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-21 14:32:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-22 14:59:02 +0200
commita6b3471c44fd981d3b33ea9050f78a0bc9494c5e (patch)
tree15fa992cfb494c23d3fd170cb2ef8b3b7a34948d /libavformat/utils.c
parent696452e4c5d217ca784fcfc5397fd12cc7ff2bd6 (diff)
avformat: add needs_parsing type to enable codec TS use.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ecc5a2e880..86f6dccf66 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1316,6 +1316,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
} else if(st->need_parsing == AVSTREAM_PARSE_FULL_ONCE) {
st->parser->flags |= PARSER_FLAG_ONCE;
+ } else if(st->need_parsing == AVSTREAM_PARSE_FULL_RAW) {
+ st->parser->flags |= PARSER_FLAG_USE_CODEC_TS;
}
}
@@ -2456,8 +2458,12 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
//only for the split stuff
if (!st->parser && !(ic->flags & AVFMT_FLAG_NOPARSE)) {
st->parser = av_parser_init(st->codec->codec_id);
- if(st->need_parsing == AVSTREAM_PARSE_HEADERS && st->parser){
- st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
+ if(st->parser){
+ if(st->need_parsing == AVSTREAM_PARSE_HEADERS){
+ st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
+ } else if(st->need_parsing == AVSTREAM_PARSE_FULL_RAW) {
+ st->parser->flags |= PARSER_FLAG_USE_CODEC_TS;
+ }
}
}
codec = st->codec->codec ? st->codec->codec :