History

avformat/utils: Move ff_is_intra_only to avformat.c

It is an auxiliary function only used by the generic muxing and demuxing code.

Andreas Rheinhardt committed 4 years ago

Commit 2831fa71 parent 9825d482 files · +12 −13Browse files

Showing the changes to libavformat (2 of 2 files). Show all

Unified · Split

2 files
  1. libavformat/avformat.c +12 −0
  2. libavformat/utils.c +0 −13
libavformat/avformat.c+12−0
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #include "libavutil/samplefmt.h"
3131 #include "libavcodec/avcodec.h"
3232 #include "libavcodec/bsf.h"
33+#include "libavcodec/codec_desc.h"
3334 #include "libavcodec/packet_internal.h"
3435 #include "avformat.h"
3536 #include "demux.h"
@@ -679,3 +680,14 @@ const AVCodec *ff_find_decoder(AVFormatContext *s, const AVStream *st, · 643 unmodified lines
679680
680681 return avcodec_find_decoder(codec_id);
681682 }
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+}
libavformat/utils.c+0−13
@@ -152,19 +152,6 @@ int av_filename_number_test(const char *filename) · 151 unmodified lines
152152
153153 /**********************************************************/
154154
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−
168155 unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id)
169156 {
170157 while (tags->id != AV_CODEC_ID_NONE) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t