mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
wavenc: Fix buffer offset by moving length incrementation
This commit is contained in:
parent
8991a713a7
commit
0cbe0d6e98
1 changed files with 2 additions and 2 deletions
|
@ -675,8 +675,6 @@ gst_wavenc_chain (GstPad * pad, GstBuffer * buf)
|
||||||
wavenc->sent_header = TRUE;
|
wavenc->sent_header = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wavenc->length += GST_BUFFER_SIZE (buf);
|
|
||||||
|
|
||||||
GST_LOG_OBJECT (wavenc, "pushing %u bytes raw audio, ts=%" GST_TIME_FORMAT,
|
GST_LOG_OBJECT (wavenc, "pushing %u bytes raw audio, ts=%" GST_TIME_FORMAT,
|
||||||
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
|
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 (buf) = WAV_HEADER_LEN + wavenc->length;
|
||||||
GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET_NONE;
|
GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET_NONE;
|
||||||
|
|
||||||
|
wavenc->length += GST_BUFFER_SIZE (buf);
|
||||||
|
|
||||||
flow = gst_pad_push (wavenc->srcpad, buf);
|
flow = gst_pad_push (wavenc->srcpad, buf);
|
||||||
|
|
||||||
return flow;
|
return flow;
|
||||||
|
|
Loading…
Reference in a new issue