Mercurial > libavformat.hg
changeset 5944:88cce1b69115 libavformat
Raise needed score for codec probing in CODEC_ID_PROBE before the last packet.
Fixes issue1871
author | michael |
---|---|
date | Sun, 11 Apr 2010 00:43:36 +0000 |
parents | 57789f5d12cf |
children | 0abde6943674 |
files | utils.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Fri Apr 09 22:39:39 2010 +0000 +++ b/utils.c Sun Apr 11 00:43:36 2010 +0000 @@ -675,7 +675,8 @@ 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);