lavc/codec_desc: introduce AV_CODEC_PROP_INTRA_ONLY flag to audio codec

Introduce AV_CODEC_PROP_INTRA_ONLY flag to audio codec as well as video codec to support non intra-only audio codec.

Signed-off-by: Yuki Tsuchiya <Yuki.Tsuchiya@sony.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Yuki Tsuchiya 2019-12-12 23:02:01 +09:00 committed by James Almer
parent aedffc0b22
commit 610473b967
2 changed files with 175 additions and 171 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1021,7 +1021,8 @@ static int is_intra_only(enum AVCodecID id)
const AVCodecDescriptor *d = avcodec_descriptor_get(id);
if (!d)
return 0;
if (d->type == AVMEDIA_TYPE_VIDEO && !(d->props & AV_CODEC_PROP_INTRA_ONLY))
if ((d->type == AVMEDIA_TYPE_VIDEO || d->type == AVMEDIA_TYPE_AUDIO) &&
!(d->props & AV_CODEC_PROP_INTRA_ONLY))
return 0;
return 1;
}