Merge commit '24e87f7f425a52b1e69661dcb2fbe0555a76f30b'

* commit '24e87f7f425a52b1e69661dcb2fbe0555a76f30b':
  Remove obsolete FF_API_PROBE_MIME cruft.

Conflicts:
	libavformat/avformat.h
	libavformat/format.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-08-10 01:36:21 +02:00
commit c218d8218d
3 changed files with 1 additions and 12 deletions

View File

@ -393,9 +393,7 @@ typedef struct AVProbeData {
const char *filename; const char *filename;
unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero. */ unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero. */
int buf_size; /**< Size of buf except extra allocated bytes */ int buf_size; /**< Size of buf except extra allocated bytes */
#if FF_API_PROBE_MIME
uint8_t *mime_type; /**< mime_type, when known. */ uint8_t *mime_type; /**< mime_type, when known. */
#endif
} AVProbeData; } AVProbeData;
#define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4) #define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4)

View File

@ -216,10 +216,8 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
if (av_match_ext(lpd.filename, fmt1->extensions)) if (av_match_ext(lpd.filename, fmt1->extensions))
score = AVPROBE_SCORE_EXTENSION; score = AVPROBE_SCORE_EXTENSION;
} }
#if FF_API_PROBE_MIME
if (av_match_name(lpd.mime_type, fmt1->mime_type)) if (av_match_name(lpd.mime_type, fmt1->mime_type))
score = FFMAX(score, AVPROBE_SCORE_EXTENSION); score = FFMAX(score, AVPROBE_SCORE_EXTENSION);
#endif
if (score > score_max) { if (score > score_max) {
score_max = score; score_max = score;
fmt = fmt1; fmt = fmt1;
@ -272,10 +270,9 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
if (offset >= max_probe_size) if (offset >= max_probe_size)
return AVERROR(EINVAL); return AVERROR(EINVAL);
#if FF_API_PROBE_MIME
if (pb->av_class) if (pb->av_class)
av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &pd.mime_type); av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &pd.mime_type);
#else #if 0
if (!*fmt && pb->av_class && av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &mime_type) >= 0 && mime_type) { if (!*fmt && pb->av_class && av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &mime_type) >= 0 && mime_type) {
if (!av_strcasecmp(mime_type, "audio/aacp")) { if (!av_strcasecmp(mime_type, "audio/aacp")) {
*fmt = av_find_input_format("aac"); *fmt = av_find_input_format("aac");
@ -338,9 +335,7 @@ fail:
if (ret >= 0) if (ret >= 0)
ret = ret2; ret = ret2;
#if FF_API_PROBE_MIME
av_free(pd.mime_type); av_free(pd.mime_type);
#endif
return ret < 0 ? ret : score; return ret < 0 ? ret : score;
} }

View File

@ -88,8 +88,4 @@
#ifndef FF_API_R_FRAME_RATE #ifndef FF_API_R_FRAME_RATE
#define FF_API_R_FRAME_RATE 1 #define FF_API_R_FRAME_RATE 1
#endif #endif
#ifndef FF_API_PROBE_MIME
#define FF_API_PROBE_MIME (LIBAVFORMAT_VERSION_MAJOR > 55)
#endif
#endif /* AVFORMAT_VERSION_H */ #endif /* AVFORMAT_VERSION_H */