add an enum for need_parsing

Originally committed as revision 8742 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs
2007-04-15 13:51:57 +00:00
parent cefd4907e3
commit 57004ff1d7
19 changed files with 40 additions and 34 deletions

View File

@@ -782,8 +782,8 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
st->parser = av_parser_init(st->codec->codec_id);
if (!st->parser) {
/* no parser available : just output the raw packets */
st->need_parsing = 0;
}else if(st->need_parsing == 2){
st->need_parsing = AVSTREAM_PARSE_NONE;
}else if(st->need_parsing == AVSTREAM_PARSE_HEADERS){
st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
}
if(st->parser && (s->iformat->flags & AVFMT_GENERIC_INDEX)){
@@ -1704,7 +1704,7 @@ int av_find_stream_info(AVFormatContext *ic)
//only for the split stuff
if (!st->parser) {
st->parser = av_parser_init(st->codec->codec_id);
if(st->need_parsing == 2 && st->parser){
if(st->need_parsing == AVSTREAM_PARSE_HEADERS && st->parser){
st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
}
}
@@ -1907,7 +1907,7 @@ int av_find_stream_info(AVFormatContext *ic)
if (st->codec->codec_id == CODEC_ID_NONE) {
codec_identified[st->index] = set_codec_from_probe_data(st, &(probe_data[st->index]), 0);
if (codec_identified[st->index]) {
st->need_parsing = 1;
st->need_parsing = AVSTREAM_PARSE_FULL;
}
}
if(!st->codec->bits_per_sample)