diff mbox series

[FFmpeg-devel,39/44] avformat/utils: Move ff_is_intra_only to avformat.c

Message ID AS8PR01MB79445570C1CC419E144F41558FC49@AS8PR01MB7944.eurprd01.prod.exchangelabs.com
State Accepted
Commit 2831fa7aed2c39d64f60aed4b2c95e7cacfc498d
Headers show
Series [FFmpeg-devel] lib*/version: Move library version functions into files of their own | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 fail Make failed
andriy/make_x86 fail Make failed

Commit Message

Andreas Rheinhardt May 7, 2022, 11:28 a.m. UTC
It is an auxiliary function only used by the generic
muxing and demuxing code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/avformat.c | 12 ++++++++++++
 libavformat/utils.c    | 13 -------------
 2 files changed, 12 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/avformat.c b/libavformat/avformat.c
index a828e6db55..eabccffcb0 100644
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -30,6 +30,7 @@ 
 #include "libavutil/samplefmt.h"
 #include "libavcodec/avcodec.h"
 #include "libavcodec/bsf.h"
+#include "libavcodec/codec_desc.h"
 #include "libavcodec/packet_internal.h"
 #include "avformat.h"
 #include "demux.h"
@@ -679,3 +680,14 @@  const AVCodec *ff_find_decoder(AVFormatContext *s, const AVStream *st,
 
     return avcodec_find_decoder(codec_id);
 }
+
+int ff_is_intra_only(enum AVCodecID id)
+{
+    const AVCodecDescriptor *d = avcodec_descriptor_get(id);
+    if (!d)
+        return 0;
+    if ((d->type == AVMEDIA_TYPE_VIDEO || d->type == AVMEDIA_TYPE_AUDIO) &&
+        !(d->props & AV_CODEC_PROP_INTRA_ONLY))
+        return 0;
+    return 1;
+}
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 68ea1d1050..343d8e7374 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -152,19 +152,6 @@  int av_filename_number_test(const char *filename)
 
 /**********************************************************/
 
-int ff_is_intra_only(enum AVCodecID id)
-{
-    const AVCodecDescriptor *d = avcodec_descriptor_get(id);
-    if (!d)
-        return 0;
-    if ((d->type == AVMEDIA_TYPE_VIDEO || d->type == AVMEDIA_TYPE_AUDIO) &&
-        !(d->props & AV_CODEC_PROP_INTRA_ONLY))
-        return 0;
-    return 1;
-}
-
-/*******************************************************/
-
 unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id)
 {
     while (tags->id != AV_CODEC_ID_NONE) {