mimdec: Flush adapter right ater using it

This commit is contained in:
Olivier Crête 2010-06-02 19:44:31 -04:00
parent fd9f049bf2
commit 456456401a

View file

@ -277,6 +277,7 @@ gst_mim_dec_chain (GstPad * pad, GstBuffer * buf)
res = GST_FLOW_ERROR; res = GST_FLOW_ERROR;
goto out; goto out;
} }
gst_adapter_flush (mimdec->adapter, payload_size);
if (GST_CLOCK_TIME_IS_VALID (in_time)) if (GST_CLOCK_TIME_IS_VALID (in_time))
GST_BUFFER_TIMESTAMP (out_buf) = in_time; GST_BUFFER_TIMESTAMP (out_buf) = in_time;
@ -300,8 +301,6 @@ gst_mim_dec_chain (GstPad * pad, GstBuffer * buf)
gst_buffer_set_caps (out_buf, caps); gst_buffer_set_caps (out_buf, caps);
gst_caps_unref (caps); gst_caps_unref (caps);
res = gst_pad_push (mimdec->srcpad, out_buf); res = gst_pad_push (mimdec->srcpad, out_buf);
gst_adapter_flush (mimdec->adapter, payload_size);
} }
out: out: