Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
205a95f7
Commit
205a95f7
authored
Dec 24, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmaenc: alloc/free coded_frame instead of keeping it in the WMACodecContext
parent
c815ca36
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
wma.c
libavcodec/wma.c
+5
-0
wma.h
libavcodec/wma.h
+0
-1
wmaenc.c
libavcodec/wmaenc.c
+5
-5
No files found.
libavcodec/wma.c
View file @
205a95f7
...
...
@@ -386,6 +386,11 @@ int ff_wma_end(AVCodecContext *avctx)
av_free
(
s
->
int_table
[
i
]);
}
#if FF_API_OLD_ENCODE_AUDIO
if
(
av_codec_is_encoder
(
avctx
->
codec
))
av_freep
(
&
avctx
->
coded_frame
);
#endif
return
0
;
}
...
...
libavcodec/wma.h
View file @
205a95f7
...
...
@@ -66,7 +66,6 @@ typedef struct CoefVLCTable {
typedef
struct
WMACodecContext
{
AVCodecContext
*
avctx
;
AVFrame
frame
;
GetBitContext
gb
;
PutBitContext
pb
;
int
version
;
///< 1 = 0x160 (WMAV1), 2 = 0x161 (WMAV2)
...
...
libavcodec/wmaenc.c
View file @
205a95f7
...
...
@@ -52,6 +52,11 @@ static int encode_init(AVCodecContext * avctx){
return
AVERROR
(
EINVAL
);
}
#if FF_API_OLD_ENCODE_AUDIO
if
(
!
(
avctx
->
coded_frame
=
avcodec_alloc_frame
()))
return
AVERROR
(
ENOMEM
);
#endif
/* extract flag infos */
flags1
=
0
;
flags2
=
1
;
...
...
@@ -88,11 +93,6 @@ static int encode_init(AVCodecContext * avctx){
s
->
frame_len
;
avctx
->
frame_size
=
avctx
->
delay
=
s
->
frame_len
;
#if FF_API_OLD_ENCODE_AUDIO
avctx
->
coded_frame
=
&
s
->
frame
;
avcodec_get_frame_defaults
(
avctx
->
coded_frame
);
#endif
return
0
;
}
...
...
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