From bae0d688dd9ee49d2cecf88224213348df87f561 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 25 Nov 2008 15:28:36 +0000 Subject: [PATCH] ext/ogg/gstoggdemux.c: If no stream was found before receiving EOS, post an error message. Original commit message from CVS: * ext/ogg/gstoggdemux.c: (gst_ogg_demux_sink_event): If no stream was found before receiving EOS, post an error message. Fixes #561924. --- ChangeLog | 6 ++++++ ext/ogg/gstoggdemux.c | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 096c49b..824d1b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-11-25 Wim Taymans + * ext/ogg/gstoggdemux.c: (gst_ogg_demux_sink_event): + If no stream was found before receiving EOS, post an error message. + Fixes #561924. + +2008-11-25 Wim Taymans + * ext/theora/gsttheoraenc.h: * ext/theora/theoraenc.c: (gst_theora_enc_init), (theora_buffer_from_packet), (theora_push_packet), diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 9ab9f04..120be20 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -1484,6 +1484,15 @@ gst_ogg_demux_sink_event (GstPad * pad, GstEvent * event) res = TRUE; break; case GST_EVENT_EOS: + { + GST_DEBUG_OBJECT (ogg, "got an EOS event"); + res = gst_pad_event_default (pad, event); + if (ogg->current_chain == NULL) { + GST_ELEMENT_ERROR (ogg, STREAM, DEMUX, (NULL), + ("can't get first chain")); + } + break; + } default: res = gst_pad_event_default (pad, event); break; -- 2.7.4