History

Deprecate match_ext() in favor of av_match_ext(), and mark it for deletion at the next major bump.

Originally committed as revision 20998 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 8eb631f1 parent 24b207b2 files · +16 −2Browse files

Unified · Split

2 files
  1. libavformat/avformat.h +9 −2
  2. libavformat/utils.c +7 −0
libavformat/avformat.h+9−2
@@ -22,7 +22,7 @@ · 21 unmodified lines
22#define AVFORMAT_AVFORMAT_H22#define AVFORMAT_AVFORMAT_H
23 23
24#define LIBAVFORMAT_VERSION_MAJOR 5224#define LIBAVFORMAT_VERSION_MAJOR 52
25#define LIBAVFORMAT_VERSION_MINOR 4525#define LIBAVFORMAT_VERSION_MINOR 46
26#define LIBAVFORMAT_VERSION_MICRO 026#define LIBAVFORMAT_VERSION_MICRO 0
27 27
28#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \28#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -1301,13 +1301,20 @@ void url_split(char *proto, int proto_size, · 1272 unmodified lines
1301 char *path, int path_size,1301 char *path, int path_size,
1302 const char *url);1302 const char *url);
1303 1303
1304#if LIBAVFORMAT_VERSION_MAJOR < 53
1305/**
1306 * @deprecated Use av_match_ext() instead.
1307 */
1308attribute_deprecated int match_ext(const char *filename, const char *extensions);
1309#endif
1310
1304/**1311/**
1305 * Returns a positive value if the given filename has one of the given1312 * Returns a positive value if the given filename has one of the given
1306 * extensions, 0 otherwise.1313 * extensions, 0 otherwise.
1307 *1314 *
1308 * @param extensions a comma-separated list of filename extensions1315 * @param extensions a comma-separated list of filename extensions
1309 */1316 */
1310int match_ext(const char *filename, const char *extensions);1317int av_match_ext(const char *filename, const char *extensions);
1311 1318
1312#endif /* HAVE_AV_CONFIG_H */1319#endif /* HAVE_AV_CONFIG_H */
1313 1320
libavformat/utils.c+7−0
@@ -137,7 +137,14 @@ void av_register_output_format(AVOutputFormat *format) · 136 unmodified lines
137 format->next = NULL;137 format->next = NULL;
138}138}
139 139
140#if LIBAVFORMAT_VERSION_MAJOR < 53
140int match_ext(const char *filename, const char *extensions)141int match_ext(const char *filename, const char *extensions)
142{
143 return av_match_ext(filename, extensions);
144}
145#endif
146
147int av_match_ext(const char *filename, const char *extensions)
141{148{
142 const char *ext, *p;149 const char *ext, *p;
143 char ext1[32], *q;150 char ext1[32], *q;

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