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
525ccbe8
Commit
525ccbe8
authored
Apr 04, 2017
by
Vittorio Giovara
Committed by
James Almer
Mar 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
segafilm: convert to new channel layout API
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
81b3ebba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
segafilm.c
libavformat/segafilm.c
+4
-4
segafilmenc.c
libavformat/segafilmenc.c
+1
-1
No files found.
libavformat/segafilm.c
View file @
525ccbe8
...
@@ -177,20 +177,20 @@ static int film_read_header(AVFormatContext *s)
...
@@ -177,20 +177,20 @@ static int film_read_header(AVFormatContext *s)
st
->
codecpar
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
st
->
codecpar
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
st
->
codecpar
->
codec_id
=
film
->
audio_type
;
st
->
codecpar
->
codec_id
=
film
->
audio_type
;
st
->
codecpar
->
codec_tag
=
1
;
st
->
codecpar
->
codec_tag
=
1
;
st
->
codecpar
->
channels
=
film
->
audio_channels
;
st
->
codecpar
->
ch
_layout
.
nb_ch
annels
=
film
->
audio_channels
;
st
->
codecpar
->
sample_rate
=
film
->
audio_samplerate
;
st
->
codecpar
->
sample_rate
=
film
->
audio_samplerate
;
if
(
film
->
audio_type
==
AV_CODEC_ID_ADPCM_ADX
)
{
if
(
film
->
audio_type
==
AV_CODEC_ID_ADPCM_ADX
)
{
st
->
codecpar
->
bits_per_coded_sample
=
18
*
8
/
32
;
st
->
codecpar
->
bits_per_coded_sample
=
18
*
8
/
32
;
st
->
codecpar
->
block_align
=
st
->
codecpar
->
channels
*
18
;
st
->
codecpar
->
block_align
=
film
->
audio_
channels
*
18
;
ffstream
(
st
)
->
need_parsing
=
AVSTREAM_PARSE_FULL
;
ffstream
(
st
)
->
need_parsing
=
AVSTREAM_PARSE_FULL
;
}
else
{
}
else
{
st
->
codecpar
->
bits_per_coded_sample
=
film
->
audio_bits
;
st
->
codecpar
->
bits_per_coded_sample
=
film
->
audio_bits
;
st
->
codecpar
->
block_align
=
st
->
codecpar
->
channels
*
st
->
codecpar
->
block_align
=
film
->
audio_
channels
*
st
->
codecpar
->
bits_per_coded_sample
/
8
;
st
->
codecpar
->
bits_per_coded_sample
/
8
;
}
}
st
->
codecpar
->
bit_rate
=
st
->
codecpar
->
channels
*
st
->
codecpar
->
sample_rate
*
st
->
codecpar
->
bit_rate
=
film
->
audio_
channels
*
st
->
codecpar
->
sample_rate
*
st
->
codecpar
->
bits_per_coded_sample
;
st
->
codecpar
->
bits_per_coded_sample
;
}
}
...
...
libavformat/segafilmenc.c
View file @
525ccbe8
...
@@ -236,7 +236,7 @@ static int film_write_header(AVFormatContext *format_context)
...
@@ -236,7 +236,7 @@ static int film_write_header(AVFormatContext *format_context)
AVStream
*
audio
=
format_context
->
streams
[
film
->
audio_index
];
AVStream
*
audio
=
format_context
->
streams
[
film
->
audio_index
];
int
audio_codec
=
get_audio_codec_id
(
audio
->
codecpar
->
codec_id
);
int
audio_codec
=
get_audio_codec_id
(
audio
->
codecpar
->
codec_id
);
bytestream_put_byte
(
&
ptr
,
audio
->
codecpar
->
channels
);
/* Audio channels */
bytestream_put_byte
(
&
ptr
,
audio
->
codecpar
->
ch
_layout
.
nb_ch
annels
);
/* Audio channels */
bytestream_put_byte
(
&
ptr
,
audio
->
codecpar
->
bits_per_coded_sample
);
/* Audio bit depth */
bytestream_put_byte
(
&
ptr
,
audio
->
codecpar
->
bits_per_coded_sample
);
/* Audio bit depth */
bytestream_put_byte
(
&
ptr
,
audio_codec
);
/* Compression - 0 is PCM, 2 is ADX */
bytestream_put_byte
(
&
ptr
,
audio_codec
);
/* Compression - 0 is PCM, 2 is ADX */
bytestream_put_be16
(
&
ptr
,
audio
->
codecpar
->
sample_rate
);
/* Audio sampling rate */
bytestream_put_be16
(
&
ptr
,
audio
->
codecpar
->
sample_rate
);
/* Audio sampling rate */
...
...
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