Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
437fb1c8
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
437fb1c8
编写于
2月 03, 2011
作者:
C
Clément Bœsch
提交者:
Mans Rullgard
2月 03, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove a few if (p) av_free(p) forms
Signed-off-by:
N
Mans Rullgard
<
mans@mansr.com
>
上级
dc75d6db
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
20 addition
and
41 deletion
+20
-41
libavcodec/dvbsubdec.c
libavcodec/dvbsubdec.c
+2
-5
libavcodec/flashsv.c
libavcodec/flashsv.c
+2
-4
libavcodec/libxvidff.c
libavcodec/libxvidff.c
+3
-6
libavcodec/mpegaudiodec.c
libavcodec/mpegaudiodec.c
+1
-2
libavcodec/smacker.c
libavcodec/smacker.c
+3
-6
libavcodec/truemotion2.c
libavcodec/truemotion2.c
+4
-8
libavcodec/tta.c
libavcodec/tta.c
+1
-2
libavformat/rtpdec_mpeg4.c
libavformat/rtpdec_mpeg4.c
+1
-2
libavformat/smacker.c
libavformat/smacker.c
+3
-6
未找到文件。
libavcodec/dvbsubdec.c
浏览文件 @
437fb1c8
...
...
@@ -332,9 +332,7 @@ static void delete_state(DVBSubContext *ctx)
ctx
->
region_list
=
region
->
next
;
delete_region_display_list
(
ctx
,
region
);
if
(
region
->
pbuf
)
av_free
(
region
->
pbuf
);
av_free
(
region
->
pbuf
);
av_free
(
region
);
}
...
...
@@ -1032,8 +1030,7 @@ static void dvbsub_parse_region_segment(AVCodecContext *avctx,
buf
+=
2
;
if
(
region
->
width
*
region
->
height
!=
region
->
buf_size
)
{
if
(
region
->
pbuf
)
av_free
(
region
->
pbuf
);
av_free
(
region
->
pbuf
);
region
->
buf_size
=
region
->
width
*
region
->
height
;
...
...
libavcodec/flashsv.c
浏览文件 @
437fb1c8
...
...
@@ -133,8 +133,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx,
/* the block size could change between frames, make sure the buffer
* is large enough, if not, get a larger one */
if
(
s
->
block_size
<
s
->
block_width
*
s
->
block_height
)
{
if
(
s
->
tmpblock
!=
NULL
)
av_free
(
s
->
tmpblock
);
av_free
(
s
->
tmpblock
);
if
((
s
->
tmpblock
=
av_malloc
(
3
*
s
->
block_width
*
s
->
block_height
))
==
NULL
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Can't allocate decompression buffer.
\n
"
);
return
-
1
;
...
...
@@ -243,8 +242,7 @@ static av_cold int flashsv_decode_end(AVCodecContext *avctx)
avctx
->
release_buffer
(
avctx
,
&
s
->
frame
);
/* free the tmpblock */
if
(
s
->
tmpblock
!=
NULL
)
av_free
(
s
->
tmpblock
);
av_free
(
s
->
tmpblock
);
return
0
;
}
...
...
libavcodec/libxvidff.c
浏览文件 @
437fb1c8
...
...
@@ -533,12 +533,9 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
av_free
(
x
->
twopassbuffer
);
av_free
(
x
->
old_twopassbuffer
);
}
if
(
x
->
twopassfile
!=
NULL
)
av_free
(
x
->
twopassfile
);
if
(
x
->
intra_matrix
!=
NULL
)
av_free
(
x
->
intra_matrix
);
if
(
x
->
inter_matrix
!=
NULL
)
av_free
(
x
->
inter_matrix
);
av_free
(
x
->
twopassfile
);
av_free
(
x
->
intra_matrix
);
av_free
(
x
->
inter_matrix
);
return
0
;
}
...
...
libavcodec/mpegaudiodec.c
浏览文件 @
437fb1c8
...
...
@@ -2227,8 +2227,7 @@ static av_cold int decode_close_mp3on4(AVCodecContext * avctx)
int
i
;
for
(
i
=
0
;
i
<
s
->
frames
;
i
++
)
if
(
s
->
mp3decctx
[
i
])
av_free
(
s
->
mp3decctx
[
i
]);
av_free
(
s
->
mp3decctx
[
i
]);
return
0
;
}
...
...
libavcodec/smacker.c
浏览文件 @
437fb1c8
...
...
@@ -677,12 +677,9 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
vlc
[
i
].
table
)
free_vlc
(
&
vlc
[
i
]);
if
(
h
[
i
].
bits
)
av_free
(
h
[
i
].
bits
);
if
(
h
[
i
].
lengths
)
av_free
(
h
[
i
].
lengths
);
if
(
h
[
i
].
values
)
av_free
(
h
[
i
].
values
);
av_free
(
h
[
i
].
bits
);
av_free
(
h
[
i
].
lengths
);
av_free
(
h
[
i
].
values
);
}
*
data_size
=
unp_size
;
...
...
libavcodec/truemotion2.c
浏览文件 @
437fb1c8
...
...
@@ -185,8 +185,7 @@ static int tm2_build_huff_table(TM2Context *ctx, TM2Codes *code)
static
void
tm2_free_codes
(
TM2Codes
*
code
)
{
if
(
code
->
recode
)
av_free
(
code
->
recode
);
av_free
(
code
->
recode
);
if
(
code
->
vlc
.
table
)
free_vlc
(
&
code
->
vlc
);
}
...
...
@@ -859,13 +858,10 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVFrame
*
pic
=
&
l
->
pic
;
int
i
;
if
(
l
->
last
)
av_free
(
l
->
last
);
if
(
l
->
clast
)
av_free
(
l
->
clast
);
av_free
(
l
->
last
);
av_free
(
l
->
clast
);
for
(
i
=
0
;
i
<
TM2_NUM_STREAMS
;
i
++
)
if
(
l
->
tokens
[
i
])
av_free
(
l
->
tokens
[
i
]);
av_free
(
l
->
tokens
[
i
]);
if
(
l
->
Y1
){
av_free
(
l
->
Y1
);
av_free
(
l
->
U1
);
...
...
libavcodec/tta.c
浏览文件 @
437fb1c8
...
...
@@ -449,8 +449,7 @@ static int tta_decode_frame(AVCodecContext *avctx,
static
av_cold
int
tta_decode_close
(
AVCodecContext
*
avctx
)
{
TTAContext
*
s
=
avctx
->
priv_data
;
if
(
s
->
decode_buffer
)
av_free
(
s
->
decode_buffer
);
av_free
(
s
->
decode_buffer
);
av_freep
(
&
s
->
ch_ctx
);
return
0
;
...
...
libavformat/rtpdec_mpeg4.c
浏览文件 @
437fb1c8
...
...
@@ -111,8 +111,7 @@ static int parse_fmtp_config(AVCodecContext * codec, char *value)
{
/* decode the hexa encoded parameter */
int
len
=
ff_hex_to_data
(
NULL
,
value
);
if
(
codec
->
extradata
)
av_free
(
codec
->
extradata
);
av_free
(
codec
->
extradata
);
codec
->
extradata
=
av_mallocz
(
len
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
...
...
libavformat/smacker.c
浏览文件 @
437fb1c8
...
...
@@ -334,12 +334,9 @@ static int smacker_read_close(AVFormatContext *s)
int
i
;
for
(
i
=
0
;
i
<
7
;
i
++
)
if
(
smk
->
bufs
[
i
])
av_free
(
smk
->
bufs
[
i
]);
if
(
smk
->
frm_size
)
av_free
(
smk
->
frm_size
);
if
(
smk
->
frm_flags
)
av_free
(
smk
->
frm_flags
);
av_free
(
smk
->
bufs
[
i
]);
av_free
(
smk
->
frm_size
);
av_free
(
smk
->
frm_flags
);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录