wavenc: Fix buffer offset by moving length incrementation

This commit is contained in:
Robert Swain 2009-10-18 00:16:06 +01:00 committed by Wim Taymans
parent 8991a713a7
commit 0cbe0d6e98

View file

@ -675,8 +675,6 @@ gst_wavenc_chain (GstPad * pad, GstBuffer * buf)
wavenc->sent_header = TRUE;
}
wavenc->length += GST_BUFFER_SIZE (buf);
GST_LOG_OBJECT (wavenc, "pushing %u bytes raw audio, ts=%" GST_TIME_FORMAT,
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
@ -686,6 +684,8 @@ gst_wavenc_chain (GstPad * pad, GstBuffer * buf)
GST_BUFFER_OFFSET (buf) = WAV_HEADER_LEN + wavenc->length;
GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET_NONE;
wavenc->length += GST_BUFFER_SIZE (buf);
flow = gst_pad_push (wavenc->srcpad, buf);
return flow;