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
402c9878
Commit
402c9878
authored
Sep 27, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libopencore-amr: remove unneeded frame_count field.
Use AVCodecContext.frame_number instead.
parent
71ccfb3f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
libopencore-amr.c
libavcodec/libopencore-amr.c
+1
-6
No files found.
libavcodec/libopencore-amr.c
View file @
402c9878
...
@@ -79,7 +79,6 @@ static int get_bitrate_mode(int bitrate, void *log_ctx)
...
@@ -79,7 +79,6 @@ static int get_bitrate_mode(int bitrate, void *log_ctx)
typedef
struct
AMRContext
{
typedef
struct
AMRContext
{
AVClass
*
av_class
;
AVClass
*
av_class
;
int
frame_count
;
void
*
dec_state
;
void
*
dec_state
;
void
*
enc_state
;
void
*
enc_state
;
int
enc_bitrate
;
int
enc_bitrate
;
...
@@ -100,7 +99,6 @@ static av_cold int amr_nb_decode_init(AVCodecContext *avctx)
...
@@ -100,7 +99,6 @@ static av_cold int amr_nb_decode_init(AVCodecContext *avctx)
{
{
AMRContext
*
s
=
avctx
->
priv_data
;
AMRContext
*
s
=
avctx
->
priv_data
;
s
->
frame_count
=
0
;
s
->
dec_state
=
Decoder_Interface_init
();
s
->
dec_state
=
Decoder_Interface_init
();
if
(
!
s
->
dec_state
)
{
if
(
!
s
->
dec_state
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Decoder_Interface_init error
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Decoder_Interface_init error
\n
"
);
...
@@ -136,7 +134,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -136,7 +134,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data,
int
packet_size
;
int
packet_size
;
av_dlog
(
avctx
,
"amr_decode_frame buf=%p buf_size=%d frame_count=%d!!
\n
"
,
av_dlog
(
avctx
,
"amr_decode_frame buf=%p buf_size=%d frame_count=%d!!
\n
"
,
buf
,
buf_size
,
s
->
frame_count
);
buf
,
buf_size
,
avctx
->
frame_number
);
dec_mode
=
(
buf
[
0
]
>>
3
)
&
0x000F
;
dec_mode
=
(
buf
[
0
]
>>
3
)
&
0x000F
;
packet_size
=
block_size
[
dec_mode
]
+
1
;
packet_size
=
block_size
[
dec_mode
]
+
1
;
...
@@ -147,7 +145,6 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -147,7 +145,6 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data,
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
s
->
frame_count
++
;
av_dlog
(
avctx
,
"packet_size=%d buf= 0x%X %X %X %X
\n
"
,
av_dlog
(
avctx
,
"packet_size=%d buf= 0x%X %X %X %X
\n
"
,
packet_size
,
buf
[
0
],
buf
[
1
],
buf
[
2
],
buf
[
3
]);
packet_size
,
buf
[
0
],
buf
[
1
],
buf
[
2
],
buf
[
3
]);
/* call decoder */
/* call decoder */
...
@@ -172,8 +169,6 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx)
...
@@ -172,8 +169,6 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx)
{
{
AMRContext
*
s
=
avctx
->
priv_data
;
AMRContext
*
s
=
avctx
->
priv_data
;
s
->
frame_count
=
0
;
if
(
avctx
->
sample_rate
!=
8000
)
{
if
(
avctx
->
sample_rate
!=
8000
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Only 8000Hz sample rate supported
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Only 8000Hz sample rate supported
\n
"
);
return
AVERROR
(
ENOSYS
);
return
AVERROR
(
ENOSYS
);
...
...
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