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
24912093
Commit
24912093
authored
May 16, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/mp4/mp4.c: fixed bug in PTS calculation.
parent
28932b3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+4
-3
No files found.
modules/demux/mp4/mp4.c
View file @
24912093
...
...
@@ -77,7 +77,7 @@ typedef struct
uint32_t
*
p_sample_delta_dts
;
/* dts delta */
uint32_t
*
p_sample_count_pts
;
uint32_t
*
p_sample_offset_pts
;
/* pts-dts */
int32_t
*
p_sample_offset_pts
;
/* pts-dts */
/* TODO if needed add pts
but quickly *add* support for edts and seeking */
...
...
@@ -228,7 +228,8 @@ static inline int64_t MP4_TrackGetPTSDelta( demux_t *p_demux, mp4_track_t *p_tra
for
(
i_index
=
0
;;
i_index
++
)
{
if
(
i_sample
<
ck
->
p_sample_count_pts
[
i_index
]
)
return
ck
->
p_sample_offset_pts
[
i_index
]
*
I64C
(
1000000
)
/
p_track
->
i_timescale
;
return
ck
->
p_sample_offset_pts
[
i_index
]
*
I64C
(
1000000
)
/
(
int64_t
)
p_track
->
i_timescale
;
i_sample
-=
ck
->
p_sample_count_pts
[
i_index
];
}
...
...
@@ -1145,7 +1146,7 @@ static int TrackCreateSamplesIndex( demux_t *p_demux,
/* allocate them */
ck
->
p_sample_count_pts
=
calloc
(
i_entry
,
sizeof
(
uint32_t
)
);
ck
->
p_sample_offset_pts
=
calloc
(
i_entry
,
sizeof
(
u
int32_t
)
);
ck
->
p_sample_offset_pts
=
calloc
(
i_entry
,
sizeof
(
int32_t
)
);
/* now copy */
i_sample_count
=
ck
->
i_sample_count
;
...
...
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