mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
lavf: warn when a parser is needed and not found.
This commit is contained in:
parent
355ac7ff6c
commit
aeba058340
@ -1246,6 +1246,9 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if (st->need_parsing && !st->parser && !(s->flags & AVFMT_FLAG_NOPARSE)) {
|
if (st->need_parsing && !st->parser && !(s->flags & AVFMT_FLAG_NOPARSE)) {
|
||||||
st->parser = av_parser_init(st->codec->codec_id);
|
st->parser = av_parser_init(st->codec->codec_id);
|
||||||
if (!st->parser) {
|
if (!st->parser) {
|
||||||
|
av_log(s, AV_LOG_WARNING, "parser not found for codec "
|
||||||
|
"%s, packets or times may be invalid.\n",
|
||||||
|
avcodec_get_name(st->codec->codec_id));
|
||||||
/* no parser available: just output the raw packets */
|
/* no parser available: just output the raw packets */
|
||||||
st->need_parsing = AVSTREAM_PARSE_NONE;
|
st->need_parsing = AVSTREAM_PARSE_NONE;
|
||||||
}else if(st->need_parsing == AVSTREAM_PARSE_HEADERS){
|
}else if(st->need_parsing == AVSTREAM_PARSE_HEADERS){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user