From eed691f7d1cacf2c0a44a86a0f034a9524c6edfc Mon Sep 17 00:00:00 2001
From: Justin Ruggles <justin.ruggles@gmail.com>
Date: Tue, 27 Mar 2012 14:08:27 -0400
Subject: [PATCH] oggdec: calculate correct timestamps in Ogg/FLAC

We need to parse the individual packet durations when there is more than one
packet in a page.
---
 libavformat/oggparseflac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c
index b1d18ed12dd..229cdcb9fa1 100644
--- a/libavformat/oggparseflac.c
+++ b/libavformat/oggparseflac.c
@@ -60,6 +60,7 @@ flac_header (AVFormatContext * s, int idx)
 
         st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = CODEC_ID_FLAC;
+        st->need_parsing = AVSTREAM_PARSE_HEADERS;
 
         st->codec->extradata =
             av_malloc(FLAC_STREAMINFO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
-- 
GitLab