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
aad4b35c
Commit
aad4b35c
authored
Mar 13, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mkv: fix opus block truncation (fix #10176)
parent
ff9af3f6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+5
-1
modules/demux/mkv/mkv.cpp
modules/demux/mkv/mkv.cpp
+3
-12
No files found.
modules/demux/mkv/matroska_segment.cpp
View file @
aad4b35c
...
...
@@ -1431,6 +1431,10 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
else
if
(
MKV_IS_ID
(
el
,
KaxDiscardPadding
)
)
{
KaxDiscardPadding
&
dp
=
*
(
KaxDiscardPadding
*
)
el
;
dp
.
ReadData
(
es
.
I_O
()
);
if
(
*
pi_duration
<
int64
(
dp
)
)
*
pi_duration
=
0
;
else
*
pi_duration
-=
int64
(
dp
);
}
#endif
...
...
modules/demux/mkv/mkv.cpp
View file @
aad4b35c
...
...
@@ -601,22 +601,13 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
continue
;
}
case
VLC_CODEC_OPUS
:
if
(
i_duration
>
0
)
{
mtime_t
i_length
=
i_duration
*
tk
->
f_timecodescale
*
(
double
)
p_segment
->
i_timescale
/
1000.0
;
if
(
i_length
<
0
)
i_length
=
0
;
p_block
->
i_nb_samples
=
i_length
*
tk
->
fmt
.
audio
.
i_rate
/
CLOCK_FREQ
;
break
;
}
else
if
(
i_duration
<
0
)
{
/* Opus uses p_block->i_length to handle discard padding */
p_block
->
i_length
=
-
1
*
i_duration
*
tk
->
fmt
.
audio
.
i_rate
/
CLOCK_FREQ
;
}
break
;
}
if
(
tk
->
fmt
.
i_cat
!=
VIDEO_ES
)
...
...
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