Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
9b54ab15
Commit
9b54ab15
authored
Mar 13, 2007
by
Aurelien Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calculate pts for laced packets
Originally committed as revision 8365 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
7fde6331
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
matroska.c
libavformat/matroska.c
+9
-4
No files found.
libavformat/matroska.c
View file @
9b54ab15
...
@@ -2427,7 +2427,7 @@ rv_offset(uint8_t *data, int slice, int slices)
...
@@ -2427,7 +2427,7 @@ rv_offset(uint8_t *data, int slice, int slices)
static
int
static
int
matroska_parse_block
(
MatroskaDemuxContext
*
matroska
,
uint8_t
*
data
,
int
size
,
matroska_parse_block
(
MatroskaDemuxContext
*
matroska
,
uint8_t
*
data
,
int
size
,
int64_t
pos
,
uint64_t
cluster_time
,
int64_t
pos
,
uint64_t
cluster_time
,
uint64_t
duration
,
int
is_keyframe
,
int
is_bframe
,
int
is_keyframe
,
int
is_bframe
,
int
*
ptrack
,
AVPacket
**
ppkt
)
int
*
ptrack
,
AVPacket
**
ppkt
)
{
{
...
@@ -2462,6 +2462,8 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size,
...
@@ -2462,6 +2462,8 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size,
av_free
(
origdata
);
av_free
(
origdata
);
return
res
;
return
res
;
}
}
if
(
duration
==
AV_NOPTS_VALUE
)
duration
=
matroska
->
tracks
[
track
]
->
default_duration
;
/* block_time (relative to cluster time) */
/* block_time (relative to cluster time) */
block_time
=
(
data
[
0
]
<<
8
)
|
data
[
1
];
block_time
=
(
data
[
0
]
<<
8
)
|
data
[
1
];
...
@@ -2597,7 +2599,8 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size,
...
@@ -2597,7 +2599,8 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size,
else
else
matroska_queue_packet
(
matroska
,
pkt
);
matroska_queue_packet
(
matroska
,
pkt
);
timecode
=
AV_NOPTS_VALUE
;
if
(
timecode
!=
AV_NOPTS_VALUE
)
timecode
=
duration
?
timecode
+
duration
:
AV_NOPTS_VALUE
;
}
}
data
+=
lace_size
[
n
];
data
+=
lace_size
[
n
];
}
}
...
@@ -2686,7 +2689,8 @@ matroska_parse_blockgroup (MatroskaDemuxContext *matroska,
...
@@ -2686,7 +2689,8 @@ matroska_parse_blockgroup (MatroskaDemuxContext *matroska,
if
(
size
>
0
)
if
(
size
>
0
)
res
=
matroska_parse_block
(
matroska
,
data
,
size
,
pos
,
cluster_time
,
res
=
matroska_parse_block
(
matroska
,
data
,
size
,
pos
,
cluster_time
,
is_keyframe
,
is_bframe
,
&
track
,
&
pkt
);
duration
,
is_keyframe
,
is_bframe
,
&
track
,
&
pkt
);
if
(
pkt
)
if
(
pkt
)
{
{
...
@@ -2743,7 +2747,8 @@ matroska_parse_cluster (MatroskaDemuxContext *matroska)
...
@@ -2743,7 +2747,8 @@ matroska_parse_cluster (MatroskaDemuxContext *matroska)
res
=
ebml_read_binary
(
matroska
,
&
id
,
&
data
,
&
size
);
res
=
ebml_read_binary
(
matroska
,
&
id
,
&
data
,
&
size
);
if
(
res
==
0
)
if
(
res
==
0
)
res
=
matroska_parse_block
(
matroska
,
data
,
size
,
pos
,
res
=
matroska_parse_block
(
matroska
,
data
,
size
,
pos
,
cluster_time
,
-
1
,
0
,
NULL
,
NULL
);
cluster_time
,
AV_NOPTS_VALUE
,
-
1
,
0
,
NULL
,
NULL
);
break
;
break
;
default:
default:
...
...
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