diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-04-11 00:43:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-04-11 00:43:36 +0000 |
commit | 0f1f4816d59cbc0d5144699ab356763387d2732d (patch) | |
tree | 669889d8b5828f2622378a83199342f8d368ddd5 /libavformat | |
parent | ac1c95645ae1ac2be4d78349a74258582dc09e2b (diff) | |
download | ffmpeg-0f1f4816d59cbc0d5144699ab356763387d2732d.tar.gz |
Raise needed score for codec probing in CODEC_ID_PROBE before the last packet.
Fixes issue1871
Originally committed as revision 22831 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index eaa912612f..20316af64b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -675,7 +675,8 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt) memset(pd->buf+pd->buf_size, 0, AVPROBE_PADDING_SIZE); if(av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)){ - set_codec_from_probe_data(s, st, pd, 1); + //FIXME we dont reduce score to 0 for the case of running out of buffer space in bytes + set_codec_from_probe_data(s, st, pd, st->probe_packets > 0 ? AVPROBE_SCORE_MAX/4 : 0); if(st->codec->codec_id != CODEC_ID_PROBE){ pd->buf_size=0; av_freep(&pd->buf); |