aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/oggdec.h
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-09-16 22:24:11 +0200
committerClément Bœsch <ubitux@gmail.com>2012-09-22 00:40:51 +0200
commitea5bd7ea6f3b817bdee6355a2b93d512d2ab6bf2 (patch)
tree21e05a4bd2f35661c39064b7f361ebab40a4e2f3 /libavformat/oggdec.h
parent405ee405c9a7e340fe175b8adf3f1172d4cf81cf (diff)
downloadffmpeg-ea5bd7ea6f3b817bdee6355a2b93d512d2ab6bf2.tar.gz
lavf/oggdec: check for begin-of-stream flag in case of chained streams.
Fix Ticket #1617, revealing a regression I introduced in 8f3eebd. We need to make sure no stream is added in between Ogg context save and restore operations (because it would likely lead to a mismatch between ogg->nstreams and AVFormatContext->nb_streams after the restore op). This is the reason the ogg->state check is added in ogg_new_stream(). Before this patch, checking for ogg->headers was preventing this: ogg->headers is always set before any ogg save/restore (though, it was also preventing from creating the stream when necessary).
Diffstat (limited to 'libavformat/oggdec.h')
-rw-r--r--libavformat/oggdec.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/oggdec.h b/libavformat/oggdec.h
index aa94db5573..dd005fa61e 100644
--- a/libavformat/oggdec.h
+++ b/libavformat/oggdec.h
@@ -76,6 +76,7 @@ struct ogg_stream {
int page_end; ///< current packet is the last one completed in the page
int keyframe_seek;
int got_start;
+ int got_data; ///< 1 if the stream got some data (non-initial packets), 0 otherwise
void *private;
};