Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 8247178288d884d18d7d1d0374fded85995a1168 Mon Sep 17 00:00:00 2001
- From: Hendrik Leppkes <h.leppkes@gmail.com>
- Date: Tue, 17 Nov 2015 00:05:32 +0100
- Subject: [PATCH] avformat/mlpdec: consider all valid mlp access units when
- probing
- ---
- libavformat/mlpdec.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
- diff --git a/libavformat/mlpdec.c b/libavformat/mlpdec.c
- index 2cce506..d82df21 100644
- --- a/libavformat/mlpdec.c
- +++ b/libavformat/mlpdec.c
- @@ -29,16 +29,19 @@ static int av_always_inline mlp_thd_probe(AVProbeData *p, uint32_t sync)
- {
- const uint8_t *buf, *last_buf = p->buf, *end = p->buf + p->buf_size;
- int frames = 0, valid = 0, size = 0;
- + int nsubframes = 0;
- for (buf = p->buf; buf + 8 <= end; buf++) {
- if (AV_RB32(buf + 4) == sync) {
- frames++;
- if (last_buf + size == buf) {
- - valid++;
- + valid += 1 + nsubframes / 8;
- }
- + nsubframes = 0;
- last_buf = buf;
- size = (AV_RB16(buf) & 0xfff) * 2;
- } else if (buf - last_buf == size) {
- + nsubframes++;
- size += (AV_RB16(buf) & 0xfff) * 2;
- }
- }
- --
- 2.6.2.windows.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement