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
11828b88
Commit
11828b88
authored
Nov 30, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nellymoserdec: Use sidedata to support mid stream sample rate changes.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
957a593c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
nellymoserdec.c
libavcodec/nellymoserdec.c
+3
-0
No files found.
libavcodec/nellymoserdec.c
View file @
11828b88
...
@@ -149,6 +149,7 @@ static int decode_tag(AVCodecContext * avctx,
...
@@ -149,6 +149,7 @@ static int decode_tag(AVCodecContext * avctx,
void
*
data
,
int
*
data_size
,
void
*
data
,
int
*
data_size
,
AVPacket
*
avpkt
)
{
AVPacket
*
avpkt
)
{
const
uint8_t
*
buf
=
avpkt
->
data
;
const
uint8_t
*
buf
=
avpkt
->
data
;
const
uint8_t
*
side
=
av_packet_get_side_data
(
avpkt
,
'F'
,
NULL
);
int
buf_size
=
avpkt
->
size
;
int
buf_size
=
avpkt
->
size
;
NellyMoserDecodeContext
*
s
=
avctx
->
priv_data
;
NellyMoserDecodeContext
*
s
=
avctx
->
priv_data
;
int
data_max
=
*
data_size
;
int
data_max
=
*
data_size
;
...
@@ -179,6 +180,8 @@ static int decode_tag(AVCodecContext * avctx,
...
@@ -179,6 +180,8 @@ static int decode_tag(AVCodecContext * avctx,
* 22050 Hz - 4
* 22050 Hz - 4
* 44100 Hz - 8
* 44100 Hz - 8
*/
*/
if
(
side
&&
blocks
>
1
&&
avctx
->
sample_rate
%
11025
==
0
&&
(
1
<<
((
side
[
0
]
>>
2
)
&
3
))
==
blocks
)
avctx
->
sample_rate
=
11025
*
(
blocks
/
2
);
for
(
i
=
0
;
i
<
blocks
;
i
++
)
{
for
(
i
=
0
;
i
<
blocks
;
i
++
)
{
if
(
avctx
->
sample_fmt
==
SAMPLE_FMT_FLT
)
{
if
(
avctx
->
sample_fmt
==
SAMPLE_FMT_FLT
)
{
...
...
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