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
2d72ea68
Commit
2d72ea68
authored
Sep 28, 2016
by
fuqiuping
Committed by
Michael Niedermayer
Nov 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/flvenc: support mp3 audio with 48khz
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
c6bc823e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
flvenc.c
libavformat/flvenc.c
+9
-0
No files found.
libavformat/flvenc.c
View file @
2d72ea68
...
@@ -107,6 +107,14 @@ static int get_audio_flags(AVFormatContext *s, AVCodecParameters *par)
...
@@ -107,6 +107,14 @@ static int get_audio_flags(AVFormatContext *s, AVCodecParameters *par)
return
FLV_CODECID_SPEEX
|
FLV_SAMPLERATE_11025HZ
|
FLV_SAMPLESSIZE_16BIT
;
return
FLV_CODECID_SPEEX
|
FLV_SAMPLERATE_11025HZ
|
FLV_SAMPLESSIZE_16BIT
;
}
else
{
}
else
{
switch
(
par
->
sample_rate
)
{
switch
(
par
->
sample_rate
)
{
case
48000
:
// 48khz mp3 is stored with 44k1 samplerate identifer
if
(
par
->
codec_id
==
AV_CODEC_ID_MP3
)
{
flags
|=
FLV_SAMPLERATE_44100HZ
;
break
;
}
else
{
goto
error
;
}
case
44100
:
case
44100
:
flags
|=
FLV_SAMPLERATE_44100HZ
;
flags
|=
FLV_SAMPLERATE_44100HZ
;
break
;
break
;
...
@@ -124,6 +132,7 @@ static int get_audio_flags(AVFormatContext *s, AVCodecParameters *par)
...
@@ -124,6 +132,7 @@ static int get_audio_flags(AVFormatContext *s, AVCodecParameters *par)
break
;
break
;
}
}
default:
default:
error:
av_log
(
s
,
AV_LOG_ERROR
,
av_log
(
s
,
AV_LOG_ERROR
,
"FLV does not support sample rate %d, "
"FLV does not support sample rate %d, "
"choose from (44100, 22050, 11025)
\n
"
,
par
->
sample_rate
);
"choose from (44100, 22050, 11025)
\n
"
,
par
->
sample_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