Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gst-plugins-good
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
0a2d9a22
Commit
0a2d9a22
authored
Jun 22, 2010
by
Mark Nauwelaerts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wavparse: proper closing segment construction
Fixes #618982.
parent
23106e24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
gst/wavparse/gstwavparse.c
gst/wavparse/gstwavparse.c
+7
-7
No files found.
gst/wavparse/gstwavparse.c
View file @
0a2d9a22
...
...
@@ -963,17 +963,14 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
/* we are running the current segment and doing a non-flushing seek,
* close the segment first based on the previous last_stop. */
GST_DEBUG_OBJECT
(
wav
,
"closing running segment %"
G_GINT64_FORMAT
" to %"
G_GINT64_FORMAT
,
wav
->
segment
.
accum
,
wav
->
segment
.
last_stop
);
" to %"
G_GINT64_FORMAT
,
wav
->
segment
.
start
,
wav
->
segment
.
last_stop
);
/* queue the segment for sending in the stream thread */
if
(
wav
->
close_segment
)
gst_event_unref
(
wav
->
close_segment
);
wav
->
close_segment
=
gst_event_new_new_segment
(
TRUE
,
wav
->
segment
.
rate
,
wav
->
segment
.
format
,
wav
->
segment
.
accum
,
wav
->
segment
.
last_stop
,
wav
->
segment
.
accum
);
/* keep track of our last_stop */
seeksegment
.
accum
=
wav
->
segment
.
last_stop
;
wav
->
segment
.
start
,
wav
->
segment
.
last_stop
,
wav
->
segment
.
start
);
}
}
...
...
@@ -1905,7 +1902,9 @@ iterate_adapter:
duration
=
next_timestamp
-
timestamp
;
/* update current running segment position */
gst_segment_set_last_stop
(
&
wav
->
segment
,
GST_FORMAT_TIME
,
next_timestamp
);
if
(
G_LIKELY
(
next_timestamp
>=
wav
->
segment
.
start
))
gst_segment_set_last_stop
(
&
wav
->
segment
,
GST_FORMAT_TIME
,
next_timestamp
);
}
else
if
(
wav
->
fact
)
{
guint64
bps
=
gst_util_uint64_scale_int
(
wav
->
datasize
,
wav
->
rate
,
wav
->
fact
);
...
...
@@ -1922,7 +1921,8 @@ iterate_adapter:
timestamp
=
GST_CLOCK_TIME_NONE
;
duration
=
GST_CLOCK_TIME_NONE
;
/* update current running segment position with byte offset */
gst_segment_set_last_stop
(
&
wav
->
segment
,
GST_FORMAT_BYTES
,
nextpos
);
if
(
G_LIKELY
(
nextpos
>=
wav
->
segment
.
start
))
gst_segment_set_last_stop
(
&
wav
->
segment
,
GST_FORMAT_BYTES
,
nextpos
);
}
if
((
pos
>
0
)
&&
wav
->
vbr
)
{
/* don't set timestamps for VBR files if it's not the first buffer */
...
...
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