Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
6449a22a
Commit
6449a22a
authored
Jan 08, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: flac: use frame pts (fix #10328)
parent
f14738ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
+3
-17
modules/demux/flac.c
modules/demux/flac.c
+3
-17
No files found.
modules/demux/flac.c
View file @
6449a22a
...
...
@@ -73,9 +73,7 @@ struct demux_sys_t
vlc_meta_t
*
p_meta
;
int64_t
i_time_offset
;
int64_t
i_pts
;
int64_t
i_pts_start
;
int64_t
i_length
;
/* Length from stream info */
int64_t
i_data_pos
;
...
...
@@ -128,9 +126,7 @@ static int Open( vlc_object_t * p_this )
p_sys
->
b_start
=
true
;
p_sys
->
p_meta
=
NULL
;
p_sys
->
i_length
=
0
;
p_sys
->
i_time_offset
=
0
;
p_sys
->
i_pts
=
0
;
p_sys
->
i_pts_start
=
0
;
p_sys
->
p_es
=
NULL
;
TAB_INIT
(
p_sys
->
i_seekpoint
,
p_sys
->
seekpoint
);
TAB_INIT
(
p_sys
->
i_attachments
,
p_sys
->
attachments
);
...
...
@@ -224,11 +220,7 @@ static int Demux( demux_t *p_demux )
p_sys
->
p_es
=
es_out_Add
(
p_demux
->
out
,
&
p_sys
->
p_packetizer
->
fmt_out
);
}
p_sys
->
i_pts
=
p_block_out
->
i_dts
-
VLC_TS_0
;
/* Correct timestamp */
p_block_out
->
i_pts
+=
p_sys
->
i_time_offset
;
p_block_out
->
i_dts
+=
p_sys
->
i_time_offset
;
p_sys
->
i_pts
=
p_block_out
->
i_dts
;
/* set PCR */
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_PCR
,
p_block_out
->
i_dts
);
...
...
@@ -273,7 +265,7 @@ static int64_t ControlGetLength( demux_t *p_demux )
static
int64_t
ControlGetTime
(
demux_t
*
p_demux
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
return
__MAX
(
p_sys
->
i_pts
,
p_sys
->
i_pts_start
)
+
p_sys
->
i_time_offset
;
return
p_sys
->
i_pts
;
}
static
int
ControlSetTime
(
demux_t
*
p_demux
,
int64_t
i_time
)
...
...
@@ -303,9 +295,7 @@ static int ControlSetTime( demux_t *p_demux, int64_t i_time )
if
(
stream_Seek
(
p_demux
->
s
,
p_sys
->
seekpoint
[
i
]
->
i_byte_offset
+
p_sys
->
i_data_pos
)
)
return
VLC_EGENERIC
;
p_sys
->
i_time_offset
=
p_sys
->
seekpoint
[
i
]
->
i_time_offset
-
p_sys
->
i_pts
;
p_sys
->
i_pts_start
=
p_sys
->
i_pts
+
i_delta_time
;
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
p_sys
->
i_pts_start
+
p_sys
->
i_time_offset
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
i_time
);
}
else
{
...
...
@@ -336,10 +326,6 @@ static int ControlSetTime( demux_t *p_demux, int64_t i_time )
if
(
stream_Seek
(
p_demux
->
s
,
p_sys
->
seekpoint
[
i
]
->
i_byte_offset
+
p_sys
->
i_data_pos
+
i_delta_offset
)
)
return
VLC_EGENERIC
;
p_sys
->
i_pts_start
=
p_sys
->
i_pts
;
i_delta_time
=
(
i_delta_time
/
i_time_align
)
*
i_time_align
;
p_sys
->
i_time_offset
=
(
p_sys
->
seekpoint
[
i
]
->
i_time_offset
+
i_delta_time
)
-
p_sys
->
i_pts
;
}
return
VLC_SUCCESS
;
}
...
...
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