]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/flac_parser: Fix number of buffered headers
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 6 Oct 2019 05:01:16 +0000 (07:01 +0200)
committerPaul B Mahol <onemda@gmail.com>
Mon, 7 Oct 2019 20:53:13 +0000 (22:53 +0200)
Only decrement the number of buffered headers if a header has actually
been freed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/flac_parser.c

index 197f234e61ad4d6c52a93f57f634359033dac4bf..8c61f3a88c380720adaba7e375b7054f7cb5fc87 100644 (file)
@@ -562,7 +562,6 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
         for (curr = best_child->next; curr; curr = curr->next)
             curr->offset -= best_child->offset;
 
-        fpc->nb_headers_buffered--;
         best_child->offset = 0;
         fpc->headers       = best_child;
         if (fpc->nb_headers_buffered >= FLAC_MIN_HEADERS) {