Commit ad05dfc0 authored by Philip Jägenstedt's avatar Philip Jägenstedt Committed by Sebastian Dröge
Browse files

matroskamux: Use SimpleBlock for WebM when possible

parent 1daeb26d
...@@ -2600,7 +2600,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad) ...@@ -2600,7 +2600,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad)
} }
} }
/* write the block, for matroska v2 use SimpleBlock if possible /* write the block, for Matroska v2 and WebM use SimpleBlock if possible
* one slice (*breath*). * one slice (*breath*).
* FIXME: Need to do correct lacing! */ * FIXME: Need to do correct lacing! */
relative_timestamp64 = GST_BUFFER_TIMESTAMP (buf) - mux->cluster_time; relative_timestamp64 = GST_BUFFER_TIMESTAMP (buf) - mux->cluster_time;
...@@ -2612,7 +2612,9 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad) ...@@ -2612,7 +2612,9 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad)
relative_timestamp64 -= mux->time_scale / 2; relative_timestamp64 -= mux->time_scale / 2;
} }
relative_timestamp = relative_timestamp64 / (gint64) mux->time_scale; relative_timestamp = relative_timestamp64 / (gint64) mux->time_scale;
if (mux->doctype == GST_MATROSKA_DOCTYPE_MATROSKA && mux->doctype_version > 1 if (((mux->doctype == GST_MATROSKA_DOCTYPE_MATROSKA
&& mux->doctype_version > 1)
|| mux->doctype == GST_MATROSKA_DOCTYPE_WEBM)
&& !write_duration) { && !write_duration) {
int flags = int flags =
GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT) ? 0 : 0x80; GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT) ? 0 : 0x80;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment