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>
pull/328/head
Yuki Tsuchiya 5 years ago committed by James Almer
parent aedffc0b22
commit 610473b967
  1. 343
      libavcodec/codec_desc.c
  2. 3
      libavformat/utils.c

File diff suppressed because it is too large Load Diff

@ -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;
}

Loading…
Cancel
Save