From: Michael Smith Date: Mon, 3 Apr 2006 12:55:18 +0000 (+0000) Subject: ext/ogg/gstoggmux.c: Oggmux sucks. X-Git-Tag: 1.19.3~511^2~12029 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b600beec9d7a2d0e7fe16383f66f56d952ed97b8;p=platform%2Fupstream%2Fgstreamer.git ext/ogg/gstoggmux.c: Oggmux sucks. Original commit message from CVS: * ext/ogg/gstoggmux.c: (gst_ogg_mux_queue_pads): Oggmux sucks. Make it suck slightly less by writing out the final page. Still can't encode a vorbis-in-ogg file correctly, though. --- diff --git a/ChangeLog b/ChangeLog index 70dc8b4..d39971f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-04-03 Michael Smith + + * ext/ogg/gstoggmux.c: (gst_ogg_mux_queue_pads): + Oggmux sucks. + Make it suck slightly less by writing out the final page. + Still can't encode a vorbis-in-ogg file correctly, though. + 2006-04-03 Andy Wingo * ext/theora/theoraparse.c (theora_parse_drain_queue): Um, remove diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 0787043..b68d597 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -768,7 +768,23 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux) } } else { GST_DEBUG_OBJECT (data->pad, "EOS on pad"); - pad->eos = TRUE; + if (!pad->eos) { + ogg_page page; + GstFlowReturn ret; + + /* Just gone to EOS. Flush existing page(s) */ + pad->eos = TRUE; + + while (ogg_stream_flush (&pad->stream, &page)) { + /* Place page into the per-pad queue */ + ret = gst_ogg_mux_pad_queue_page (ogg_mux, pad, &page, + pad->first_delta); + /* increment the page number counter */ + pad->pageno++; + /* mark other pages as delta */ + pad->first_delta = TRUE; + } + } } pad->buffer = buf;