diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2018-03-01 17:15:02 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2018-03-01 17:15:02 -0500 |
commit | c0bf793c05cf793aa18a8548cda702625e388115 (patch) | |
tree | 04b7a237aef0d6c4ecfaac4ace725210f6b265db | |
parent | f29fe76d7e9e7e602cdb09e053640849d670b32c (diff) |
flvmux: Set PTS based on running time
https://bugzilla.gnome.org/show_bug.cgi?id=793457
-rw-r--r-- | gst/flv/gstflvmux.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c index 7e3aab4a1..c3ec66c24 100644 --- a/gst/flv/gstflvmux.c +++ b/gst/flv/gstflvmux.c @@ -1171,7 +1171,12 @@ gst_flv_mux_buffer_to_tag_internal (GstFlvMux * mux, GstBuffer * buffer, /* if we are streamable we copy over timestamps and offsets, if not just copy the offsets */ if (mux->streamable) { - gst_buffer_copy_into (tag, buffer, GST_BUFFER_COPY_TIMESTAMPS, 0, -1); + GstClockTime timestamp = GST_CLOCK_TIME_NONE; + + if (gst_segment_to_running_time_full (&GST_AGGREGATOR_PAD (pad)->segment, + GST_FORMAT_TIME, GST_BUFFER_DTS_OR_PTS (buffer), ×tamp) == 1) + GST_BUFFER_PTS (tag) = timestamp; + GST_BUFFER_OFFSET (tag) = GST_BUFFER_OFFSET_NONE; GST_BUFFER_OFFSET_END (tag) = GST_BUFFER_OFFSET_NONE; } else { |