diff options
Diffstat (limited to 'libavformat/flacdec.c')
-rw-r--r-- | libavformat/flacdec.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c index 3dd3e1f70f..3d2550f54d 100644 --- a/libavformat/flacdec.c +++ b/libavformat/flacdec.c @@ -116,11 +116,9 @@ static int flac_read_header(AVFormatContext *s, static int flac_probe(AVProbeData *p) { - uint8_t *bufptr = p->buf; - uint8_t *end = p->buf + p->buf_size; - - if(bufptr > end-4 || memcmp(bufptr, "fLaC", 4)) return 0; - else return AVPROBE_SCORE_MAX/2; + if (p->buf_size < 4 || memcmp(p->buf, "fLaC", 4)) + return 0; + return AVPROBE_SCORE_MAX/2; } AVInputFormat ff_flac_demuxer = { |