mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-12-24 11:52:06 +08:00
add an enum for need_parsing
Originally committed as revision 8742 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user