Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
b49e80a6
Commit
b49e80a6
authored
May 13, 2019
by
Anton Khirnov
Committed by
James Almer
Mar 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3dostr: convert to new channel layout API
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
ac10e3c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
3dostr.c
libavformat/3dostr.c
+6
-6
No files found.
libavformat/3dostr.c
View file @
b49e80a6
...
...
@@ -102,15 +102,15 @@ static int threedostr_read_header(AVFormatContext *s)
st
->
codecpar
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
st
->
codecpar
->
sample_rate
=
avio_rb32
(
s
->
pb
);
st
->
codecpar
->
ch
annels
=
avio_rb32
(
s
->
pb
);
if
(
st
->
codecpar
->
channels
<=
0
||
st
->
codecpar
->
sample_rate
<=
0
)
st
->
codecpar
->
ch
_layout
.
nb_channels
=
avio_rb32
(
s
->
pb
);
if
(
st
->
codecpar
->
ch
_layout
.
nb_ch
annels
<=
0
||
st
->
codecpar
->
sample_rate
<=
0
)
return
AVERROR_INVALIDDATA
;
codec
=
avio_rl32
(
s
->
pb
);
avio_skip
(
s
->
pb
,
4
);
if
(
ctrl_size
==
20
||
ctrl_size
==
3
||
ctrl_size
==
-
1
)
st
->
duration
=
(
avio_rb32
(
s
->
pb
)
-
1
)
/
st
->
codecpar
->
channels
;
st
->
duration
=
(
avio_rb32
(
s
->
pb
)
-
1
)
/
st
->
codecpar
->
ch
_layout
.
nb_ch
annels
;
else
st
->
duration
=
avio_rb32
(
s
->
pb
)
*
16
/
st
->
codecpar
->
channels
;
st
->
duration
=
avio_rb32
(
s
->
pb
)
*
16
/
st
->
codecpar
->
ch
_layout
.
nb_ch
annels
;
size
-=
56
;
found_shdr
=
1
;
break
;
...
...
@@ -135,7 +135,7 @@ static int threedostr_read_header(AVFormatContext *s)
switch
(
codec
)
{
case
MKTAG
(
'S'
,
'D'
,
'X'
,
'2'
):
st
->
codecpar
->
codec_id
=
AV_CODEC_ID_SDX2_DPCM
;
st
->
codecpar
->
block_align
=
1
*
st
->
codecpar
->
channels
;
st
->
codecpar
->
block_align
=
1
*
st
->
codecpar
->
ch
_layout
.
nb_ch
annels
;
break
;
default:
avpriv_request_sample
(
s
,
"codec %X"
,
codec
);
...
...
@@ -178,7 +178,7 @@ static int threedostr_read_packet(AVFormatContext *s, AVPacket *pkt)
ret
=
av_get_packet
(
s
->
pb
,
pkt
,
size
);
pkt
->
pos
=
pos
;
pkt
->
stream_index
=
0
;
pkt
->
duration
=
size
/
st
->
codecpar
->
channels
;
pkt
->
duration
=
size
/
st
->
codecpar
->
ch
_layout
.
nb_ch
annels
;
return
ret
;
default:
av_log
(
s
,
AV_LOG_DEBUG
,
"skipping unknown chunk: %X
\n
"
,
chunk
);
...
...
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