Browse Source

avformat: use AVPROBE_SCORE_STREAM_RETRY, instead of AVPROBE_SCORE_RETRY - 1

This makes the code clearer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 11 years ago
parent
commit
1bc2fa447c
3 changed files with 4 additions and 2 deletions
  1. +2
    -0
      libavformat/avformat.h
  2. +1
    -1
      libavformat/utils.c
  3. +1
    -1
      libavformat/version.h

+ 2
- 0
libavformat/avformat.h View File

@@ -338,6 +338,8 @@ typedef struct AVProbeData {
} AVProbeData; } AVProbeData;


#define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4) #define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4)
#define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1)

#define AVPROBE_SCORE_EXTENSION 50 ///< score for file extension #define AVPROBE_SCORE_EXTENSION 50 ///< score for file extension
#define AVPROBE_SCORE_MAX 100 ///< maximum score #define AVPROBE_SCORE_MAX 100 ///< maximum score




+ 1
- 1
libavformat/utils.c View File

@@ -659,7 +659,7 @@ no_packet:


if (end || av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) { if (end || av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {
int score = set_codec_from_probe_data(s, st, pd); int score = set_codec_from_probe_data(s, st, pd);
if ( (st->codec->codec_id != AV_CODEC_ID_NONE && score > AVPROBE_SCORE_RETRY-1)
if ( (st->codec->codec_id != AV_CODEC_ID_NONE && score > AVPROBE_SCORE_STREAM_RETRY)
|| end) { || end) {
pd->buf_size = 0; pd->buf_size = 0;
av_freep(&pd->buf); av_freep(&pd->buf);


+ 1
- 1
libavformat/version.h View File

@@ -31,7 +31,7 @@


#define LIBAVFORMAT_VERSION_MAJOR 55 #define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 29 #define LIBAVFORMAT_VERSION_MINOR 29
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_MICRO 101


#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \ LIBAVFORMAT_VERSION_MINOR, \


Loading…
Cancel
Save