avdemux: fix not-negotiated errors

Drop caps event received on the sink pad, instead of
putting it in the list of cached events to be sent
downstream later. We don't want to send our container
caps downstream to our decoders, that'll give us
nasty not-negotiated errors.

https://bugzilla.gnome.org/show_bug.cgi?id=680464
This commit is contained in:
Tim-Philipp Müller 2012-09-28 16:53:49 +01:00
parent f0d700d5ca
commit 07cec6d216

View file

@ -1000,6 +1000,7 @@ gst_ffmpegdemux_get_stream (GstFFMpegDemux * demux, AVStream * avstream)
gst_pad_push_event (pad, gst_event_new_stream_start (stream_id));
g_free (stream_id);
GST_INFO_OBJECT (pad, "adding pad with caps %" GST_PTR_FORMAT, caps);
gst_pad_set_caps (pad, caps);
gst_caps_unref (caps);
@ -1603,6 +1604,11 @@ gst_ffmpegdemux_sink_event (GstPad * sinkpad, GstObject * parent,
/* eat this event for now, task will send eos when finished */
gst_event_unref (event);
goto done;
case GST_EVENT_STREAM_START:
case GST_EVENT_CAPS:
GST_LOG_OBJECT (demux, "dropping %s event", GST_EVENT_TYPE_NAME (event));
gst_event_unref (event);
goto done;
default:
/* for a serialized event, wait until an earlier data is gone,
* though this is no guarantee as to when task is done with it.