diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-29 21:02:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-29 21:02:48 +0200 |
commit | 9694695a21d08ae470b2db6278f92c5c31d07b41 (patch) | |
tree | 2daaf25c601887e8f530f1a0b04876c4c4ec849b /libavformat | |
parent | 80a3a6611fe5866163b2e64da7c492fff7874a03 (diff) | |
download | ffmpeg-9694695a21d08ae470b2db6278f92c5c31d07b41.tar.gz |
avformat: fix probe mime version checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avformat.h | 2 | ||||
-rw-r--r-- | libavformat/format.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8412d3a31b..156524a688 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -393,7 +393,7 @@ typedef struct AVProbeData { const char *filename; 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 */ -#ifdef FF_API_PROBE_MIME +#if FF_API_PROBE_MIME uint8_t *mime_type; /**< mime_type, when known. */ #endif } AVProbeData; diff --git a/libavformat/format.c b/libavformat/format.c index f29bb8027a..28dd672e94 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -214,7 +214,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, if (av_match_ext(lpd.filename, fmt1->extensions)) score = AVPROBE_SCORE_EXTENSION; } -#ifdef FF_API_PROBE_MIME +#if FF_API_PROBE_MIME if (av_match_name(lpd.mime_type, fmt1->mime_type)) score = FFMAX(score, AVPROBE_SCORE_EXTENSION); #endif @@ -269,7 +269,7 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt, if (offset >= max_probe_size) return AVERROR(EINVAL); -#ifdef FF_API_PROBE_MIME +#if FF_API_PROBE_MIME if (pb->av_class) av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &pd.mime_type); #endif @@ -336,7 +336,7 @@ fail: if (ret >= 0) ret = ffio_rewind_with_probe_data(pb, &buf, buf_offset); -#ifdef FF_API_PROBE_MIME +#if FF_API_PROBE_MIME av_free(pd.mime_type); #endif return ret < 0 ? ret : score; |