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
324d9664
Commit
324d9664
authored
Feb 13, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvorbisdec: Remove AVFrame from context
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
fe845772
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
libvorbisdec.c
libavcodec/libvorbisdec.c
+5
-6
No files found.
libavcodec/libvorbisdec.c
View file @
324d9664
...
...
@@ -25,7 +25,6 @@
#include "internal.h"
typedef
struct
OggVorbisDecContext
{
AVFrame
frame
;
vorbis_info
vi
;
/**< vorbis_info used during init */
vorbis_dsp_state
vd
;
/**< DSP state used for analysis */
vorbis_block
vb
;
/**< vorbis_block used for analysis */
...
...
@@ -131,6 +130,7 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, void *data,
int
*
got_frame_ptr
,
AVPacket
*
avpkt
)
{
OggVorbisDecContext
*
context
=
avccontext
->
priv_data
;
AVFrame
*
frame
=
data
;
float
**
pcm
;
ogg_packet
*
op
=
&
context
->
op
;
int
samples
,
total_samples
,
total_bytes
;
...
...
@@ -142,12 +142,12 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, void *data,
return
0
;
}
context
->
frame
.
nb_samples
=
8192
*
4
;
if
((
ret
=
ff_get_buffer
(
avccontext
,
&
context
->
frame
))
<
0
)
{
frame
->
nb_samples
=
8192
*
4
;
if
((
ret
=
ff_get_buffer
(
avccontext
,
frame
))
<
0
)
{
av_log
(
avccontext
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
ret
;
}
output
=
(
int16_t
*
)
context
->
frame
.
data
[
0
];
output
=
(
int16_t
*
)
frame
->
data
[
0
];
op
->
packet
=
avpkt
->
data
;
...
...
@@ -172,9 +172,8 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, void *data,
vorbis_synthesis_read
(
&
context
->
vd
,
samples
)
;
}
context
->
frame
.
nb_samples
=
total_samples
;
frame
->
nb_samples
=
total_samples
;
*
got_frame_ptr
=
1
;
*
(
AVFrame
*
)
data
=
context
->
frame
;
return
avpkt
->
size
;
}
...
...
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