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
5138ff14
Commit
5138ff14
authored
Jul 09, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alac: use AVPacket fields directly in alac_decode_frame()
parent
7a206eb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
alac.c
libavcodec/alac.c
+5
-6
No files found.
libavcodec/alac.c
View file @
5138ff14
...
...
@@ -291,8 +291,6 @@ static void interleave_stereo_24(int32_t *buffer[MAX_CHANNELS],
static
int
alac_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
got_frame_ptr
,
AVPacket
*
avpkt
)
{
const
uint8_t
*
inbuffer
=
avpkt
->
data
;
int
input_buffer_size
=
avpkt
->
size
;
ALACContext
*
alac
=
avctx
->
priv_data
;
int
channels
;
...
...
@@ -303,7 +301,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
uint8_t
interlacing_leftweight
;
int
i
,
ch
,
ret
;
init_get_bits
(
&
alac
->
gb
,
inbuffer
,
input_buffer_
size
*
8
);
init_get_bits
(
&
alac
->
gb
,
avpkt
->
data
,
avpkt
->
size
*
8
);
channels
=
get_bits
(
&
alac
->
gb
,
3
)
+
1
;
if
(
channels
!=
avctx
->
channels
)
{
...
...
@@ -457,13 +455,14 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
break
;
}
if
(
input_buffer_size
*
8
-
get_bits_count
(
&
alac
->
gb
)
>
8
)
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error : %d bits left
\n
"
,
input_buffer_size
*
8
-
get_bits_count
(
&
alac
->
gb
));
if
(
avpkt
->
size
*
8
-
get_bits_count
(
&
alac
->
gb
)
>
8
)
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error : %d bits left
\n
"
,
avpkt
->
size
*
8
-
get_bits_count
(
&
alac
->
gb
));
*
got_frame_ptr
=
1
;
*
(
AVFrame
*
)
data
=
alac
->
frame
;
return
input_buffer_
size
;
return
avpkt
->
size
;
}
static
av_cold
int
alac_decode_close
(
AVCodecContext
*
avctx
)
...
...
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