It is an auxiliary function only used by the generic muxing and demuxing code.
Unified · Split
| @@ -30,6 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | #include "libavutil/samplefmt.h" |
| 31 | 31 | #include "libavcodec/avcodec.h" |
| 32 | 32 | #include "libavcodec/bsf.h" |
| 33 | +#include "libavcodec/codec_desc.h" | |
| 33 | 34 | #include "libavcodec/packet_internal.h" |
| 34 | 35 | #include "avformat.h" |
| 35 | 36 | #include "demux.h" |
| @@ -679,3 +680,14 @@ const AVCodec *ff_find_decoder(AVFormatContext *s, const AVStream *st, · 643 unmodified lines | ||
| 679 | 680 | |
| 680 | 681 | return avcodec_find_decoder(codec_id); |
| 681 | 682 | } |
| 683 | + | |
| 684 | +int ff_is_intra_only(enum AVCodecID id) | |
| 685 | +{ | |
| 686 | + const AVCodecDescriptor *d = avcodec_descriptor_get(id); | |
| 687 | + if (!d) | |
| 688 | + return 0; | |
| 689 | + if ((d->type == AVMEDIA_TYPE_VIDEO || d->type == AVMEDIA_TYPE_AUDIO) && | |
| 690 | + !(d->props & AV_CODEC_PROP_INTRA_ONLY)) | |
| 691 | + return 0; | |
| 692 | + return 1; | |
| 693 | +} | |
| @@ -152,19 +152,6 @@ int av_filename_number_test(const char *filename) · 151 unmodified lines | ||
| 152 | 152 | |
| 153 | 153 | /**********************************************************/ |
| 154 | 154 | |
| 155 | −int ff_is_intra_only(enum AVCodecID id) | |
| 156 | −{ | |
| 157 | − const AVCodecDescriptor *d = avcodec_descriptor_get(id); | |
| 158 | − if (!d) | |
| 159 | − return 0; | |
| 160 | − if ((d->type == AVMEDIA_TYPE_VIDEO || d->type == AVMEDIA_TYPE_AUDIO) && | |
| 161 | − !(d->props & AV_CODEC_PROP_INTRA_ONLY)) | |
| 162 | − return 0; | |
| 163 | − return 1; | |
| 164 | −} | |
| 165 | − | |
| 166 | −/*******************************************************/ | |
| 167 | − | |
| 168 | 155 | unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id) |
| 169 | 156 | { |
| 170 | 157 | while (tags->id != AV_CODEC_ID_NONE) { |