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
30#include "libavutil/samplefmt.h"30#include "libavutil/samplefmt.h"
31#include "libavcodec/avcodec.h"31#include "libavcodec/avcodec.h"
32#include "libavcodec/bsf.h"32#include "libavcodec/bsf.h"
33#include "libavcodec/codec_desc.h"
33#include "libavcodec/packet_internal.h"34#include "libavcodec/packet_internal.h"
34#include "avformat.h"35#include "avformat.h"
35#include "demux.h"36#include "demux.h"
@@ -679,3 +680,14 @@ const AVCodec *ff_find_decoder(AVFormatContext *s, const AVStream *st, · 643 unmodified lines
679 680
680 return avcodec_find_decoder(codec_id);681 return avcodec_find_decoder(codec_id);
681}682}
683
684int 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
152 152
153/**********************************************************/153/**********************************************************/
154 154
155int 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
168unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id)155unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id)
169{156{
170 while (tags->id != AV_CODEC_ID_NONE) {157 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