1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

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).
This commit is contained in:
Clément Bœsch
2012-09-16 22:24:11 +02:00
parent 405ee405c9
commit ea5bd7ea6f
2 changed files with 22 additions and 1 deletions

View File

@@ -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;
};