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
85af60df
Commit
85af60df
authored
Nov 10, 2017
by
Aleksandr Slobodeniuk
Committed by
Michael Niedermayer
Nov 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: fix wrong duration of packets (dvd, bluray)
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
b197d83c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
utils.c
libavcodec/utils.c
+4
-4
No files found.
libavcodec/utils.c
View file @
85af60df
...
...
@@ -1808,13 +1808,13 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba,
/* calc from frame_bytes, channels, and bits_per_coded_sample */
switch
(
id
)
{
case
AV_CODEC_ID_PCM_DVD
:
if
(
bps
<
4
)
if
(
bps
<
4
||
frame_bytes
<
3
)
return
0
;
return
2
*
(
frame_bytes
/
((
bps
*
2
/
8
)
*
ch
));
return
2
*
(
(
frame_bytes
-
3
)
/
((
bps
*
2
/
8
)
*
ch
));
case
AV_CODEC_ID_PCM_BLURAY
:
if
(
bps
<
4
)
if
(
bps
<
4
||
frame_bytes
<
4
)
return
0
;
return
frame_bytes
/
((
FFALIGN
(
ch
,
2
)
*
bps
)
/
8
);
return
(
frame_bytes
-
4
)
/
((
FFALIGN
(
ch
,
2
)
*
bps
)
/
8
);
case
AV_CODEC_ID_S302M
:
return
2
*
(
frame_bytes
/
((
bps
+
4
)
/
4
))
/
ch
;
}
...
...
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