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
c51311b9
Commit
c51311b9
authored
Oct 19, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atrac3: move the 'frame_factor' field from ATRAC3Context to where it is used
parent
7e76f270
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
atrac3.c
libavcodec/atrac3.c
+6
-7
No files found.
libavcodec/atrac3.c
View file @
c51311b9
...
@@ -109,7 +109,6 @@ typedef struct ATRAC3Context {
...
@@ -109,7 +109,6 @@ typedef struct ATRAC3Context {
//@{
//@{
/** extradata */
/** extradata */
int
scrambled_stream
;
int
scrambled_stream
;
int
frame_factor
;
//@}
//@}
FFTContext
mdct_ctx
;
FFTContext
mdct_ctx
;
...
@@ -847,7 +846,7 @@ static int atrac3_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -847,7 +846,7 @@ static int atrac3_decode_frame(AVCodecContext *avctx, void *data,
static
av_cold
int
atrac3_decode_init
(
AVCodecContext
*
avctx
)
static
av_cold
int
atrac3_decode_init
(
AVCodecContext
*
avctx
)
{
{
int
i
,
ret
;
int
i
,
ret
;
int
version
,
delay
,
samples_per_frame
;
int
version
,
delay
,
samples_per_frame
,
frame_factor
;
const
uint8_t
*
edata_ptr
=
avctx
->
extradata
;
const
uint8_t
*
edata_ptr
=
avctx
->
extradata
;
ATRAC3Context
*
q
=
avctx
->
priv_data
;
ATRAC3Context
*
q
=
avctx
->
priv_data
;
static
VLC_TYPE
atrac3_vlc_table
[
4096
][
2
];
static
VLC_TYPE
atrac3_vlc_table
[
4096
][
2
];
...
@@ -870,7 +869,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
...
@@ -870,7 +869,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
q
->
coding_mode
=
bytestream_get_le16
(
&
edata_ptr
);
q
->
coding_mode
=
bytestream_get_le16
(
&
edata_ptr
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
"[8-9] %d
\n
"
,
av_log
(
avctx
,
AV_LOG_DEBUG
,
"[8-9] %d
\n
"
,
bytestream_get_le16
(
&
edata_ptr
));
//Dupe of coding mode
bytestream_get_le16
(
&
edata_ptr
));
//Dupe of coding mode
q
->
frame_factor
=
bytestream_get_le16
(
&
edata_ptr
);
// Unknown always 1
frame_factor
=
bytestream_get_le16
(
&
edata_ptr
);
// Unknown always 1
av_log
(
avctx
,
AV_LOG_DEBUG
,
"[12-13] %d
\n
"
,
av_log
(
avctx
,
AV_LOG_DEBUG
,
"[12-13] %d
\n
"
,
bytestream_get_le16
(
&
edata_ptr
));
// Unknown always 0
bytestream_get_le16
(
&
edata_ptr
));
// Unknown always 0
...
@@ -881,12 +880,12 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
...
@@ -881,12 +880,12 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
q
->
coding_mode
=
q
->
coding_mode
?
JOINT_STEREO
:
STEREO
;
q
->
coding_mode
=
q
->
coding_mode
?
JOINT_STEREO
:
STEREO
;
q
->
scrambled_stream
=
0
;
q
->
scrambled_stream
=
0
;
if
(
avctx
->
block_align
!=
96
*
avctx
->
channels
*
q
->
frame_factor
&&
if
(
avctx
->
block_align
!=
96
*
avctx
->
channels
*
frame_factor
&&
avctx
->
block_align
!=
152
*
avctx
->
channels
*
q
->
frame_factor
&&
avctx
->
block_align
!=
152
*
avctx
->
channels
*
frame_factor
&&
avctx
->
block_align
!=
192
*
avctx
->
channels
*
q
->
frame_factor
)
{
avctx
->
block_align
!=
192
*
avctx
->
channels
*
frame_factor
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unknown frame/channel/frame_factor "
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unknown frame/channel/frame_factor "
"configuration %d/%d/%d
\n
"
,
avctx
->
block_align
,
"configuration %d/%d/%d
\n
"
,
avctx
->
block_align
,
avctx
->
channels
,
q
->
frame_factor
);
avctx
->
channels
,
frame_factor
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
}
else
if
(
avctx
->
extradata_size
==
10
)
{
}
else
if
(
avctx
->
extradata_size
==
10
)
{
...
...
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