Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
B1ack1e
FFmpeg
提交
b22dbb29
F
FFmpeg
项目概览
B1ack1e
/
FFmpeg
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FFmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b22dbb29
编写于
2月 04, 2011
作者:
M
Martin Storsjö
提交者:
Ronald S. Bultje
2月 04, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use avformat_free_context for cleaning up muxers
Signed-off-by:
N
Ronald S. Bultje
<
rsbultje@gmail.com
>
上级
ff197489
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
7 addition
and
51 deletion
+7
-51
ffmpeg.c
ffmpeg.c
+1
-15
libavformat/movenchint.c
libavformat/movenchint.c
+3
-17
libavformat/rtpenc_chain.c
libavformat/rtpenc_chain.c
+1
-5
libavformat/rtsp.c
libavformat/rtsp.c
+1
-7
libavformat/sapenc.c
libavformat/sapenc.c
+1
-7
未找到文件。
ffmpeg.c
浏览文件 @
b22dbb29
...
...
@@ -505,25 +505,11 @@ static int ffmpeg_exit(int ret)
/* close files */
for
(
i
=
0
;
i
<
nb_output_files
;
i
++
)
{
/* maybe av_close_output_file ??? */
AVFormatContext
*
s
=
output_files
[
i
];
int
j
;
if
(
!
(
s
->
oformat
->
flags
&
AVFMT_NOFILE
)
&&
s
->
pb
)
url_fclose
(
s
->
pb
);
for
(
j
=
0
;
j
<
s
->
nb_streams
;
j
++
)
{
av_metadata_free
(
&
s
->
streams
[
j
]
->
metadata
);
av_free
(
s
->
streams
[
j
]
->
codec
);
av_free
(
s
->
streams
[
j
]
->
info
);
av_free
(
s
->
streams
[
j
]);
}
for
(
j
=
0
;
j
<
s
->
nb_programs
;
j
++
)
{
av_metadata_free
(
&
s
->
programs
[
j
]
->
metadata
);
}
for
(
j
=
0
;
j
<
s
->
nb_chapters
;
j
++
)
{
av_metadata_free
(
&
s
->
chapters
[
j
]
->
metadata
);
}
av_metadata_free
(
&
s
->
metadata
);
av_free
(
s
);
avformat_free_context
(
s
);
av_free
(
output_streams_for_file
[
i
]);
}
for
(
i
=
0
;
i
<
nb_input_files
;
i
++
)
{
...
...
libavformat/movenchint.c
浏览文件 @
b22dbb29
...
...
@@ -81,17 +81,9 @@ fail:
url_close_dyn_buf
(
track
->
rtp_ctx
->
pb
,
&
buf
);
av_free
(
buf
);
}
if
(
track
->
rtp_ctx
&&
track
->
rtp_ctx
->
streams
[
0
])
{
av_metadata_free
(
&
track
->
rtp_ctx
->
streams
[
0
]
->
metadata
);
av_free
(
track
->
rtp_ctx
->
streams
[
0
]
->
codec
->
extradata
);
av_free
(
track
->
rtp_ctx
->
streams
[
0
]
->
codec
);
av_free
(
track
->
rtp_ctx
->
streams
[
0
]
->
info
);
av_free
(
track
->
rtp_ctx
->
streams
[
0
]);
}
if
(
track
->
rtp_ctx
)
{
av_metadata_free
(
&
track
->
rtp_ctx
->
metadata
);
av_free
(
track
->
rtp_ctx
->
priv_data
);
av_freep
(
&
track
->
rtp_ctx
);
avformat_free_context
(
track
->
rtp_ctx
);
track
->
rtp_ctx
=
NULL
;
}
av_freep
(
&
track
->
enc
);
/* Set a default timescale, to avoid crashes in dump_format */
...
...
@@ -488,12 +480,6 @@ void ff_mov_close_hinting(MOVTrack *track) {
url_close_dyn_buf
(
rtp_ctx
->
pb
,
&
ptr
);
av_free
(
ptr
);
}
av_metadata_free
(
&
rtp_ctx
->
streams
[
0
]
->
metadata
);
av_metadata_free
(
&
rtp_ctx
->
metadata
);
av_free
(
rtp_ctx
->
streams
[
0
]
->
codec
->
extradata
);
av_free
(
rtp_ctx
->
streams
[
0
]
->
codec
);
av_free
(
rtp_ctx
->
streams
[
0
]
->
info
);
av_free
(
rtp_ctx
->
streams
[
0
]);
av_freep
(
&
rtp_ctx
);
avformat_free_context
(
rtp_ctx
);
}
libavformat/rtpenc_chain.c
浏览文件 @
b22dbb29
...
...
@@ -66,11 +66,7 @@ AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st,
url_close_dyn_buf
(
rtpctx
->
pb
,
&
ptr
);
av_free
(
ptr
);
}
av_free
(
rtpctx
->
streams
[
0
]
->
codec
->
extradata
);
av_free
(
rtpctx
->
streams
[
0
]
->
codec
);
av_free
(
rtpctx
->
streams
[
0
]
->
info
);
av_free
(
rtpctx
->
streams
[
0
]);
av_free
(
rtpctx
);
avformat_free_context
(
rtpctx
);
return
NULL
;
}
...
...
libavformat/rtsp.c
浏览文件 @
b22dbb29
...
...
@@ -498,13 +498,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s)
}
else
{
url_fclose
(
rtpctx
->
pb
);
}
av_metadata_free
(
&
rtpctx
->
streams
[
0
]
->
metadata
);
av_metadata_free
(
&
rtpctx
->
metadata
);
av_free
(
rtpctx
->
streams
[
0
]
->
codec
->
extradata
);
av_free
(
rtpctx
->
streams
[
0
]
->
codec
);
av_free
(
rtpctx
->
streams
[
0
]
->
info
);
av_free
(
rtpctx
->
streams
[
0
]);
av_free
(
rtpctx
);
avformat_free_context
(
rtpctx
);
}
else
if
(
rt
->
transport
==
RTSP_TRANSPORT_RDT
&&
CONFIG_RTPDEC
)
ff_rdt_parse_close
(
rtsp_st
->
transport_priv
);
else
if
(
CONFIG_RTPDEC
)
...
...
libavformat/sapenc.c
浏览文件 @
b22dbb29
...
...
@@ -46,13 +46,7 @@ static int sap_write_close(AVFormatContext *s)
continue
;
av_write_trailer
(
rtpctx
);
url_fclose
(
rtpctx
->
pb
);
av_metadata_free
(
&
rtpctx
->
streams
[
0
]
->
metadata
);
av_metadata_free
(
&
rtpctx
->
metadata
);
av_free
(
rtpctx
->
streams
[
0
]
->
codec
->
extradata
);
av_free
(
rtpctx
->
streams
[
0
]
->
codec
);
av_free
(
rtpctx
->
streams
[
0
]
->
info
);
av_free
(
rtpctx
->
streams
[
0
]);
av_free
(
rtpctx
);
avformat_free_context
(
rtpctx
);
s
->
streams
[
i
]
->
priv_data
=
NULL
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录