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
56a9d2b4
Commit
56a9d2b4
authored
Oct 18, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atrac3: move the 'version' field from ATRAC3Context to where it is used
parent
5ac673b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
atrac3.c
libavcodec/atrac3.c
+5
-5
No files found.
libavcodec/atrac3.c
View file @
56a9d2b4
...
...
@@ -113,7 +113,6 @@ typedef struct ATRAC3Context {
//@}
//@{
/** extradata */
int
version
;
int
delay
;
int
scrambled_stream
;
int
frame_factor
;
...
...
@@ -854,6 +853,7 @@ static int atrac3_decode_frame(AVCodecContext *avctx, void *data,
static
av_cold
int
atrac3_decode_init
(
AVCodecContext
*
avctx
)
{
int
i
,
ret
;
int
version
;
const
uint8_t
*
edata_ptr
=
avctx
->
extradata
;
ATRAC3Context
*
q
=
avctx
->
priv_data
;
static
VLC_TYPE
atrac3_vlc_table
[
4096
][
2
];
...
...
@@ -885,7 +885,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
/* setup */
q
->
samples_per_frame
=
SAMPLES_PER_FRAME
*
avctx
->
channels
;
q
->
version
=
4
;
version
=
4
;
q
->
delay
=
0x88E
;
q
->
coding_mode
=
q
->
coding_mode
?
JOINT_STEREO
:
STEREO
;
q
->
scrambled_stream
=
0
;
...
...
@@ -900,7 +900,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
}
}
else
if
(
avctx
->
extradata_size
==
10
)
{
/* Parse the extradata, RM format. */
q
->
version
=
bytestream_get_be32
(
&
edata_ptr
);
version
=
bytestream_get_be32
(
&
edata_ptr
);
q
->
samples_per_frame
=
bytestream_get_be16
(
&
edata_ptr
);
q
->
delay
=
bytestream_get_be16
(
&
edata_ptr
);
q
->
coding_mode
=
bytestream_get_be16
(
&
edata_ptr
);
...
...
@@ -914,8 +914,8 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
/* Check the extradata */
if
(
q
->
version
!=
4
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Version %d != 4.
\n
"
,
q
->
version
);
if
(
version
!=
4
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Version %d != 4.
\n
"
,
version
);
return
AVERROR_INVALIDDATA
;
}
...
...
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