diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-05 13:16:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-05 13:34:56 +0200 |
commit | 097f668047c8dd6308217c244075b1f97d496116 (patch) | |
tree | 08b6d6417d571fed496740ebece94bd8ec4874fe | |
parent | a1f234be11ea040d59f92279b331d5aeef3243b4 (diff) | |
download | ffmpeg-097f668047c8dd6308217c244075b1f97d496116.tar.gz |
avformat: replace "AVPROBE_SCORE_MAX / X" by AVPROBE_SCORE_EXTENSION / Y
Demuxers where the changed code looked less readable where skiped
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/aqtitledec.c | 2 | ||||
-rw-r--r-- | libavformat/avr.c | 2 | ||||
-rw-r--r-- | libavformat/bit.c | 2 | ||||
-rw-r--r-- | libavformat/boadec.c | 2 | ||||
-rw-r--r-- | libavformat/cdxl.c | 2 | ||||
-rw-r--r-- | libavformat/jacosubdec.c | 2 | ||||
-rw-r--r-- | libavformat/libquvi.c | 2 | ||||
-rw-r--r-- | libavformat/loasdec.c | 6 | ||||
-rw-r--r-- | libavformat/lvfdec.c | 2 | ||||
-rw-r--r-- | libavformat/mpsubdec.c | 2 | ||||
-rw-r--r-- | libavformat/realtextdec.c | 2 | ||||
-rw-r--r-- | libavformat/subviewer1dec.c | 2 | ||||
-rw-r--r-- | libavformat/subviewerdec.c | 2 | ||||
-rw-r--r-- | libavformat/tedcaptionsdec.c | 2 | ||||
-rw-r--r-- | libavformat/wavdec.c | 4 |
15 files changed, 18 insertions, 18 deletions
diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index a78fd814d7..810f95b493 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -43,7 +43,7 @@ static int aqt_probe(AVProbeData *p) const char *ptr = p->buf; if (sscanf(ptr, "-->> %d", &frame) == 1) - return AVPROBE_SCORE_MAX / 2; + return AVPROBE_SCORE_EXTENSION; return 0; } diff --git a/libavformat/avr.c b/libavformat/avr.c index 473136ec3c..e03f1a46f7 100644 --- a/libavformat/avr.c +++ b/libavformat/avr.c @@ -27,7 +27,7 @@ static int avr_probe(AVProbeData *p) { if (AV_RL32(p->buf) == MKTAG('2', 'B', 'I', 'T')) - return AVPROBE_SCORE_MAX / 2; + return AVPROBE_SCORE_EXTENSION; return 0; } diff --git a/libavformat/bit.c b/libavformat/bit.c index 9b2246ca85..0be471ac4f 100644 --- a/libavformat/bit.c +++ b/libavformat/bit.c @@ -44,7 +44,7 @@ static int probe(AVProbeData *p) return 0; i+=j; } - return AVPROBE_SCORE_MAX/2; + return AVPROBE_SCORE_EXTENSION; } static int read_header(AVFormatContext *s) diff --git a/libavformat/boadec.c b/libavformat/boadec.c index 459ae746bf..45f6b3976b 100644 --- a/libavformat/boadec.c +++ b/libavformat/boadec.c @@ -35,7 +35,7 @@ static int probe(AVProbeData *p) || AV_RL32(p->buf + 48) % AV_RL32(p->buf + 21) ) return 0; - return AVPROBE_SCORE_MAX / 2; + return AVPROBE_SCORE_EXTENSION; } diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c index 185b745bb0..ab8a846cc5 100644 --- a/libavformat/cdxl.c +++ b/libavformat/cdxl.c @@ -41,7 +41,7 @@ typedef struct CDXLDemuxContext { static int cdxl_read_probe(AVProbeData *p) { - int score = AVPROBE_SCORE_MAX / 2 + 10; + int score = AVPROBE_SCORE_EXTENSION + 10; if (p->buf_size < CDXL_HEADER_SIZE) return 0; diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c index 89e7e1bf54..da1afadf1b 100644 --- a/libavformat/jacosubdec.c +++ b/libavformat/jacosubdec.c @@ -60,7 +60,7 @@ static int jacosub_probe(AVProbeData *p) ptr++; if (*ptr != '#' && *ptr != '\n') { if (timed_line(ptr)) - return AVPROBE_SCORE_MAX/2 + 1; + return AVPROBE_SCORE_EXTENSION + 1; return 0; } ptr += strcspn(ptr, "\n") + 1; diff --git a/libavformat/libquvi.c b/libavformat/libquvi.c index fbae74c6c4..ca71f9fd8c 100644 --- a/libavformat/libquvi.c +++ b/libavformat/libquvi.c @@ -127,7 +127,7 @@ static int libquvi_probe(AVProbeData *p) rc = quvi_init(&q); if (rc != QUVI_OK) return AVERROR(ENOMEM); - score = quvi_supported(q, (char *)p->filename) == QUVI_OK ? AVPROBE_SCORE_MAX/2 : 0; + score = quvi_supported(q, (char *)p->filename) == QUVI_OK ? AVPROBE_SCORE_EXTENSION : 0; quvi_close(&q); return score; } diff --git a/libavformat/loasdec.c b/libavformat/loasdec.c index d3a8dbd6cd..05ef0fe3ad 100644 --- a/libavformat/loasdec.c +++ b/libavformat/loasdec.c @@ -52,9 +52,9 @@ static int loas_probe(AVProbeData *p) if(buf == buf0) first_frames= frames; } - if (first_frames>=3) return AVPROBE_SCORE_MAX/2+1; - else if(max_frames>100)return AVPROBE_SCORE_MAX/2; - else if(max_frames>=3) return AVPROBE_SCORE_MAX/4; + if (first_frames>=3) return AVPROBE_SCORE_EXTENSION+1; + else if(max_frames>100)return AVPROBE_SCORE_EXTENSION; + else if(max_frames>=3) return AVPROBE_SCORE_EXTENSION / 2; else return 0; } diff --git a/libavformat/lvfdec.c b/libavformat/lvfdec.c index f8dda58571..a809c6767b 100644 --- a/libavformat/lvfdec.c +++ b/libavformat/lvfdec.c @@ -26,7 +26,7 @@ static int lvf_probe(AVProbeData *p) { if (AV_RL32(p->buf) == MKTAG('L', 'V', 'F', 'F')) - return AVPROBE_SCORE_MAX / 2; + return AVPROBE_SCORE_EXTENSION; return 0; } diff --git a/libavformat/mpsubdec.c b/libavformat/mpsubdec.c index 2acafaa81b..11b8e2ed68 100644 --- a/libavformat/mpsubdec.c +++ b/libavformat/mpsubdec.c @@ -41,7 +41,7 @@ static int mpsub_probe(AVProbeData *p) if (!memcmp(ptr, "FORMAT=TIME", 11) || sscanf(ptr, "FORMAT=%d", &n) == 1) - return AVPROBE_SCORE_MAX/2; + return AVPROBE_SCORE_EXTENSION; ptr += strcspn(ptr, "\n") + 1; } return 0; diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c index 67bc33983a..5e4981a40b 100644 --- a/libavformat/realtextdec.c +++ b/libavformat/realtextdec.c @@ -41,7 +41,7 @@ static int realtext_probe(AVProbeData *p) if (AV_RB24(ptr) == 0xEFBBBF) ptr += 3; /* skip UTF-8 BOM */ - return !av_strncasecmp(ptr, "<window", 7) ? AVPROBE_SCORE_MAX/2 : 0; + return !av_strncasecmp(ptr, "<window", 7) ? AVPROBE_SCORE_EXTENSION : 0; } static int read_ts(const char *s) diff --git a/libavformat/subviewer1dec.c b/libavformat/subviewer1dec.c index 0dc1942a42..1b831b7b8f 100644 --- a/libavformat/subviewer1dec.c +++ b/libavformat/subviewer1dec.c @@ -36,7 +36,7 @@ static int subviewer1_probe(AVProbeData *p) const unsigned char *ptr = p->buf; if (strstr(ptr, "******** START SCRIPT ********")) - return AVPROBE_SCORE_MAX / 2; + return AVPROBE_SCORE_EXTENSION; return 0; } diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c index 7cacd973db..9e645d25c7 100644 --- a/libavformat/subviewerdec.c +++ b/libavformat/subviewerdec.c @@ -44,7 +44,7 @@ static int subviewer_probe(AVProbeData *p) if (AV_RB24(ptr) == 0xEFBBBF) ptr += 3; /* skip UTF-8 BOM */ if (sscanf(ptr, "%*u:%*u:%*u.%*u,%*u:%*u:%*u.%*u%c", &c) == 1) - return AVPROBE_SCORE_MAX/2; + return AVPROBE_SCORE_EXTENSION; if (!strncmp(ptr, "[INFORMATION]", 13)) return AVPROBE_SCORE_MAX/3; return 0; diff --git a/libavformat/tedcaptionsdec.c b/libavformat/tedcaptionsdec.c index 048ba96981..b468969590 100644 --- a/libavformat/tedcaptionsdec.c +++ b/libavformat/tedcaptionsdec.c @@ -340,7 +340,7 @@ static av_cold int tedcaptions_read_probe(AVProbeData *p) count++; } return count == FF_ARRAY_ELEMS(tags) ? AVPROBE_SCORE_MAX : - count ? AVPROBE_SCORE_MAX / 2 : 0; + count ? AVPROBE_SCORE_EXTENSION : 0; } static int tedcaptions_read_seek(AVFormatContext *avf, int stream_index, diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 74dbbff7f4..bd39ffee7f 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -99,7 +99,7 @@ static int wav_probe(AVProbeData *p) static void handle_stream_probing(AVStream *st) { if (st->codec->codec_id == AV_CODEC_ID_PCM_S16LE) { - st->request_probe = AVPROBE_SCORE_MAX/2; + st->request_probe = AVPROBE_SCORE_EXTENSION; st->probe_packets = FFMIN(st->probe_packets, 4); } } @@ -427,7 +427,7 @@ static int wav_read_packet(AVFormatContext *s, AVPacket *pkt) enum AVCodecID codec; ret = ff_spdif_probe(s->pb->buffer, s->pb->buf_end - s->pb->buffer, &codec); - if (ret > AVPROBE_SCORE_MAX / 2) { + if (ret > AVPROBE_SCORE_EXTENSION) { s->streams[0]->codec->codec_id = codec; wav->spdif = 1; } else { |