diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-09-17 00:24:11 +0400 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-09-22 02:40:51 +0400 |
commit | ea5bd7ea6f3b817bdee6355a2b93d512d2ab6bf2 (patch) | |
tree | 21e05a4bd2f35661c39064b7f361ebab40a4e2f3 /libavformat/oggdec.h | |
parent | 405ee405c9a7e340fe175b8adf3f1172d4cf81cf (diff) |
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.h | 1 |
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; }; |