[FFmpeg-cvslog] Remove obsolete FF_API_PROBE_MIME cruft.

Anton Khirnov git at videolan.org
Sun Aug 10 01:41:55 CEST 2014


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Aug  6 19:58:57 2014 +0000| [24e87f7f425a52b1e69661dcb2fbe0555a76f30b] | committer: Anton Khirnov

Remove obsolete FF_API_PROBE_MIME cruft.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=24e87f7f425a52b1e69661dcb2fbe0555a76f30b
---

 libavformat/avformat.h |    2 --
 libavformat/format.c   |    6 ------
 libavformat/version.h  |    4 ----
 3 files changed, 12 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index ab2081a..2948d40 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -391,9 +391,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
     uint8_t *mime_type; /**< mime_type, when known. */
-#endif
 } AVProbeData;
 
 #define AVPROBE_SCORE_EXTENSION  50 ///< score for file extension
diff --git a/libavformat/format.c b/libavformat/format.c
index 93829ae..bdc9044 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -195,10 +195,8 @@ AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened,
             if (av_match_ext(lpd.filename, fmt1->extensions))
                 score = AVPROBE_SCORE_EXTENSION;
         }
-#ifdef FF_API_PROBE_MIME
         if (av_match_name(lpd.mime_type, fmt1->mime_type))
             score = FFMAX(score, AVPROBE_SCORE_EXTENSION);
-#endif
         if (score > *score_max) {
             *score_max = score;
             fmt        = fmt1;
@@ -256,10 +254,8 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
         return AVERROR(EINVAL);
     avio_skip(pb, offset);
     max_probe_size -= offset;
-#ifdef FF_API_PROBE_MIME
     if (pb->av_class)
         av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &pd.mime_type);
-#endif
     for (probe_size = PROBE_BUF_MIN; probe_size <= max_probe_size && !*fmt;
          probe_size = FFMIN(probe_size << 1,
                             FFMAX(max_probe_size, probe_size + 1))) {
@@ -305,8 +301,6 @@ fail:
         (ret = ffio_rewind_with_probe_data(pb, buf, pd.buf_size)) < 0) {
         av_free(buf);
     }
-#ifdef FF_API_PROBE_MIME
     av_free(pd.mime_type);
-#endif
     return ret;
 }
diff --git a/libavformat/version.h b/libavformat/version.h
index 89f4ba1..5eb9249 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -61,8 +61,4 @@
 #define FF_API_LAVF_CODEC_TB            (LIBAVFORMAT_VERSION_MAJOR < 57)
 #endif
 
-#ifndef FF_API_PROBE_MIME
-#define FF_API_PROBE_MIME               (LIBAVFORMAT_VERSION_MAJOR > 55)
-#endif
-
 #endif /* AVFORMAT_VERSION_H */



More information about the ffmpeg-cvslog mailing list