Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
b363832c
Commit
b363832c
authored
Sep 14, 2013
by
Matej Knopp
Committed by
Sebastian Dröge
Sep 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qtmux: set first_ts to DTS for streams that have DTS
https://bugzilla.gnome.org/show_bug.cgi?id=707340
parent
39f7e522
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
gst/isomp4/gstqtmux.c
gst/isomp4/gstqtmux.c
+9
-1
No files found.
gst/isomp4/gstqtmux.c
View file @
b363832c
...
...
@@ -2176,12 +2176,20 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
/* if this is the first buffer, store the timestamp */
if
(
G_UNLIKELY
(
pad
->
first_ts
==
GST_CLOCK_TIME_NONE
)
&&
last_buf
)
{
if
(
GST_CLOCK_TIME_IS_VALID
(
GST_BUFFER_PTS
(
last_buf
)))
{
if
(
pad
->
have_dts
)
{
/* first pad always has DTS. If it was not provided by upstream it was set to segment start */
pad
->
first_ts
=
GST_BUFFER_DTS
(
last_buf
);
}
else
if
(
GST_BUFFER_PTS_IS_VALID
(
last_buf
))
{
pad
->
first_ts
=
GST_BUFFER_PTS
(
last_buf
);
}
if
(
GST_CLOCK_TIME_IS_VALID
(
pad
->
first_ts
))
{
GST_DEBUG
(
"setting first_ts to %"
G_GUINT64_FORMAT
,
pad
->
first_ts
);
last_buf
=
gst_buffer_make_writable
(
last_buf
);
check_and_subtract_ts
(
qtmux
,
&
GST_BUFFER_DTS
(
last_buf
),
pad
->
first_ts
);
check_and_subtract_ts
(
qtmux
,
&
GST_BUFFER_PTS
(
last_buf
),
pad
->
first_ts
);
if
(
buf
)
{
buf
=
gst_buffer_make_writable
(
buf
);
check_and_subtract_ts
(
qtmux
,
&
GST_BUFFER_DTS
(
buf
),
pad
->
first_ts
);
check_and_subtract_ts
(
qtmux
,
&
GST_BUFFER_PTS
(
buf
),
pad
->
first_ts
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment