diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-04-01 20:58:48 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-04-01 20:58:48 +0200 |
commit | 1f7705e5b16d83d2ac4bfc48c7b8d6a34bfef20a (patch) | |
tree | 7b4baf1da241e3ee1df463812bebdaa897db14e1 | |
parent | 7643e27528047f02dd1a2ae61332308d2e22196d (diff) | |
download | ffmpeg-1f7705e5b16d83d2ac4bfc48c7b8d6a34bfef20a.tar.gz |
avformat/mpeg: fix logic failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavformat/mpeg.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index e3dd404677..0c507e9f01 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -450,13 +450,14 @@ redo: return ret; startcode = avio_r8(s->pb); - if (startcode == 0x0b && avio_r8(s->pb) == 0x77) { - startcode = 0x80; - m->raw_ac3 = 1; - avio_skip(s->pb, -2); + m->raw_ac3 = 0; + if (startcode == 0x0b) { + if (avio_r8(s->pb) == 0x77) { + startcode = 0x80; + m->raw_ac3 = 1; + avio_skip(s->pb, -2); + } } else { - m->raw_ac3 = 0; - avio_skip(s->pb, -1); len--; } } |