From: Mark Nauwelaerts Date: Tue, 11 May 2010 10:06:10 +0000 (+0200) Subject: avimux: check that pads have been negotiated X-Git-Tag: 1.19.3~509^2~8644 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ae7119d11ba959c23cdaf57ebf61aeb06b77253;p=platform%2Fupstream%2Fgstreamer.git avimux: check that pads have been negotiated Also set fcc_handler field in audio stream header. Fixes #618351. --- diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c index 23ea480..a0e6b80 100644 --- a/gst/avi/gstavimux.c +++ b/gst/avi/gstavimux.c @@ -934,6 +934,7 @@ gst_avi_mux_audsink_set_caps (GstPad * pad, GstCaps * vscaps) if (!avipad->auds.format) goto refuse_caps; + avipad->parent.hdr.fcc_handler = avipad->auds.format; gst_avi_mux_audsink_set_fields (avimux, avipad); gst_object_unref (avimux); @@ -2069,6 +2070,9 @@ gst_avi_mux_do_one_buffer (GstAviMux * avimux) if (!avipad->collect) continue; + if (!avipad->hdr.fcc_handler) + goto not_negotiated; + buffer = gst_collect_pads_peek (avimux->collect, avipad->collect); if (!buffer) continue; @@ -2097,6 +2101,14 @@ gst_avi_mux_do_one_buffer (GstAviMux * avimux) gst_pad_push_event (avimux->srcpad, gst_event_new_eos ()); return GST_FLOW_UNEXPECTED; } + + /* ERRORS */ +not_negotiated: + { + GST_ELEMENT_ERROR (avimux, CORE, NEGOTIATION, (NULL), + ("pad %s not negotiated", GST_PAD_NAME (avipad->collect->pad))); + return GST_FLOW_NOT_NEGOTIATED; + } } static GstFlowReturn