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
eb29649c
Commit
eb29649c
authored
Aug 03, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set bits_per_coded_sample when encoding ADPCM.
parent
f1b7c7e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
adpcm.c
libavcodec/adpcm.c
+2
-0
No files found.
libavcodec/adpcm.c
View file @
eb29649c
...
...
@@ -198,6 +198,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
avctx
->
frame_size
=
(
BLKSIZE
-
4
*
avctx
->
channels
)
*
8
/
(
4
*
avctx
->
channels
)
+
1
;
/* each 16 bits sample gives one nibble */
/* and we have 4 bytes per channel overhead */
avctx
->
block_align
=
BLKSIZE
;
avctx
->
bits_per_coded_sample
=
4
;
/* seems frame_size isn't taken into account... have to buffer the samples :-( */
break
;
case
CODEC_ID_ADPCM_IMA_QT
:
...
...
@@ -208,6 +209,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
avctx
->
frame_size
=
(
BLKSIZE
-
7
*
avctx
->
channels
)
*
2
/
avctx
->
channels
+
2
;
/* each 16 bits sample gives one nibble */
/* and we have 7 bytes per channel overhead */
avctx
->
block_align
=
BLKSIZE
;
avctx
->
bits_per_coded_sample
=
4
;
avctx
->
extradata_size
=
32
;
extradata
=
avctx
->
extradata
=
av_malloc
(
avctx
->
extradata_size
);
if
(
!
extradata
)
...
...
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