Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_25606643
ijkplayer
提交
aaa95c57
I
ijkplayer
项目概览
qq_25606643
/
ijkplayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
ijkplayer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
aaa95c57
编写于
3月 06, 2017
作者:
R
raymondzheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ijkplayer: ijkio fix cache crash and memory leak
上级
39b583e8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
5 deletion
+14
-5
ijkmedia/ijkplayer/ijkavformat/ijkio.c
ijkmedia/ijkplayer/ijkavformat/ijkio.c
+1
-1
ijkmedia/ijkplayer/ijkavformat/ijkiocache.c
ijkmedia/ijkplayer/ijkavformat/ijkiocache.c
+10
-2
ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c
ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c
+3
-2
未找到文件。
ijkmedia/ijkplayer/ijkavformat/ijkio.c
浏览文件 @
aaa95c57
...
...
@@ -66,7 +66,7 @@ static int ijkio_open(URLContext *h, const char *arg, int flags, AVDictionary **
ret
=
ijkio_manager_io_open
(
manager_ctx
,
arg
,
flags
,
&
opts
);
ijk_av_dict_free
(
&
opts
);
if
(
ret
<
0
)
{
if
(
ret
!=
0
)
{
ijkio_manager_io_close
(
manager_ctx
);
}
...
...
ijkmedia/ijkplayer/ijkavformat/ijkiocache.c
浏览文件 @
aaa95c57
...
...
@@ -725,7 +725,7 @@ static int ijkio_cache_open(IjkURLContext *h, const char *url, int flags, IjkAVD
if
(
c
->
inner
&&
!
ret
)
{
c
->
inner
->
ijkio_app_ctx
=
c
->
ijkio_app_ctx
;
ret
=
c
->
inner
->
prot
->
url_open2
(
c
->
inner
,
url
,
flags
,
options
);
if
(
ret
<
0
)
if
(
ret
!=
0
)
goto
url_fail
;
else
c
->
logical_size
=
ijkio_cache_ffurl_size
(
h
);
...
...
@@ -755,8 +755,11 @@ static int ijkio_cache_open(IjkURLContext *h, const char *url, int flags, IjkAVD
goto
cond_wakeup_exit_fail
;
}
c
->
task_is_running
=
1
;
ret
=
ijk_threadpool_add
(
c
->
threadpool_ctx
,
ijkio_cache_task
,
h
,
NULL
,
0
);
if
(
ret
)
{
c
->
task_is_running
=
0
;
pthread_cond_signal
(
&
c
->
cond_wakeup_exit
);
goto
thread_fail
;
}
...
...
@@ -946,14 +949,19 @@ static int ijkio_cache_resume(IjkURLContext *h) {
if
(
c
->
inner
->
prot
->
url_resume
)
{
ret
=
c
->
inner
->
prot
->
url_resume
(
c
->
inner
);
if
(
ret
<
0
)
{
if
(
ret
!=
0
)
{
return
ret
;
}
}
c
->
abort_request
=
0
;
c
->
task_is_running
=
1
;
ret
=
ijk_threadpool_add
(
c
->
threadpool_ctx
,
ijkio_cache_task
,
h
,
NULL
,
0
);
if
(
ret
)
{
c
->
task_is_running
=
0
;
pthread_cond_signal
(
&
c
->
cond_wakeup_exit
);
}
return
ret
;
}
...
...
ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c
浏览文件 @
aaa95c57
...
...
@@ -152,7 +152,7 @@ int ijkio_manager_io_open(IjkIOManagerContext *h, const char *url, int flags, Ij
ijk_map_put
(
h
->
ijk_ctx_map
,
(
int64_t
)(
intptr_t
)
h
->
cur_ffmpeg_ctx
,
inner
);
}
ret
=
inner
->
prot
->
url_open2
(
inner
,
url
,
flags
,
options
);
if
(
ret
<
0
)
if
(
ret
!=
0
)
goto
fail
;
return
ret
;
...
...
@@ -182,7 +182,7 @@ int ijkio_manager_io_read(IjkIOManagerContext *h, unsigned char *buf, int size)
if
(
inner
->
state
==
IJKURL_PAUSED
)
{
if
(
inner
->
prot
->
url_resume
)
{
ret
=
inner
->
prot
->
url_resume
(
inner
);
if
(
ret
<
0
)
{
if
(
ret
!=
0
)
{
return
ret
;
}
}
...
...
@@ -228,6 +228,7 @@ int ijkio_manager_io_close(IjkIOManagerContext *h) {
ret
=
inner
->
prot
->
url_close
(
inner
);
}
ijk_map_remove
(
h
->
ijk_ctx_map
,
(
int64_t
)(
intptr_t
)
h
->
cur_ffmpeg_ctx
);
ijk_av_freep
(
&
inner
->
priv_data
);
ijk_av_freep
(
&
inner
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录