flvmux: GST_BUFFER_OFFSETs should be GST_BUFFER_OFFSET_NONE

Or else flvdemux don't understand it

https://bugzilla.gnome.org/show_bug.cgi?id=754435
This commit is contained in:
Havard Graff 2015-09-22 22:59:16 +02:00 committed by Sebastian Dröge
parent cf3a2294da
commit b6f133ba17
2 changed files with 8 additions and 1 deletions

View file

@ -1152,6 +1152,8 @@ gst_flv_mux_buffer_to_tag_internal (GstFlvMux * mux, GstBuffer * buffer,
if not just copy the offsets */
if (mux->streamable) {
gst_buffer_copy_into (tag, buffer, GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
GST_BUFFER_OFFSET (tag) = GST_BUFFER_OFFSET_NONE;
GST_BUFFER_OFFSET_END (tag) = GST_BUFFER_OFFSET_NONE;
} else {
GST_BUFFER_OFFSET (tag) = GST_BUFFER_OFFSET (buffer);
GST_BUFFER_OFFSET_END (tag) = GST_BUFFER_OFFSET_END (buffer);

View file

@ -162,6 +162,8 @@ create_buffer (guint8 * data, gsize size,
GST_BUFFER_PTS (buf) = timestamp;
GST_BUFFER_DTS (buf) = timestamp;
GST_BUFFER_DURATION (buf) = duration;
GST_BUFFER_OFFSET (buf) = 0;
GST_BUFFER_OFFSET_END (buf) = 0;
return buf;
}
@ -257,7 +259,6 @@ GST_START_TEST (test_speex_streamable)
buf = gst_harness_pull (h);
fail_unless_equals_uint64 (base_time, GST_BUFFER_PTS (buf));
fail_unless_equals_uint64 (base_time, GST_BUFFER_DTS (buf));
fail_unless_equals_uint64 (0, GST_BUFFER_DURATION (buf));
gst_buffer_map (buf, &map, GST_MAP_READ);
/* 0x08 means it is audio */
fail_unless_equals_int (0x08, map.data[0]);
@ -292,6 +293,8 @@ GST_START_TEST (test_speex_streamable)
fail_unless_equals_uint64 (base_time, GST_BUFFER_PTS (buf));
fail_unless_equals_uint64 (base_time, GST_BUFFER_DTS (buf));
fail_unless_equals_uint64 (duration, GST_BUFFER_DURATION (buf));
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE, GST_BUFFER_OFFSET (buf));
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE, GST_BUFFER_OFFSET_END (buf));
gst_buffer_map (buf, &map, GST_MAP_READ);
/* 0x08 means it is audio */
fail_unless_equals_int (0x08, map.data[0]);
@ -309,6 +312,8 @@ GST_START_TEST (test_speex_streamable)
fail_unless_equals_uint64 (base_time + duration, GST_BUFFER_PTS (buf));
fail_unless_equals_uint64 (base_time + duration, GST_BUFFER_DTS (buf));
fail_unless_equals_uint64 (duration, GST_BUFFER_DURATION (buf));
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE, GST_BUFFER_OFFSET (buf));
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE, GST_BUFFER_OFFSET_END (buf));
gst_buffer_map (buf, &map, GST_MAP_READ);
/* 0x08 means it is audio */
fail_unless_equals_int (0x08, map.data[0]);