Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_25606643
ijkplayer
提交
e5559eb7
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,体验更适合开发者的 AI 搜索 >>
提交
e5559eb7
编写于
6月 26, 2013
作者:
Z
Zhang Rui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ffplay: attach ffp->is before start thread
上级
b5113c40
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
2 deletion
+8
-2
ijkmediaplayer/jni/ijkplayer/ff_ffplay.c
ijkmediaplayer/jni/ijkplayer/ff_ffplay.c
+8
-2
未找到文件。
ijkmediaplayer/jni/ijkplayer/ff_ffplay.c
浏览文件 @
e5559eb7
...
...
@@ -748,6 +748,7 @@ static int get_video_frame(FFPlayer *ffp, AVFrame *frame, int64_t *pts, AVPacket
if
(
avcodec_decode_video2
(
is
->
video_st
->
codec
,
frame
,
&
got_picture
,
pkt
)
<
0
)
return
0
;
FFTRACE
(
"avcodec_decode_video2()>=0"
);
if
(
got_picture
)
{
int
ret
=
1
;
...
...
@@ -1135,6 +1136,7 @@ static int audio_decode_frame(VideoState *is)
break
;
new_packet
=
0
;
len1
=
avcodec_decode_audio4
(
dec
,
is
->
frame
,
&
got_frame
,
pkt_temp
);
FFTRACE
(
"avcodec_decode_audio4()=%d"
,
len1
);
if
(
len1
<
0
)
{
/* if error, we skip the frame */
pkt_temp
->
size
=
0
;
...
...
@@ -1806,6 +1808,7 @@ static int read_thread(void *arg)
continue
;
}
ret
=
av_read_frame
(
ic
,
pkt
);
FFTRACE
(
"av_read_frame()=%d"
,
ret
);
if
(
ret
<
0
)
{
if
(
ret
==
AVERROR_EOF
||
url_feof
(
ic
->
pb
))
eof
=
1
;
...
...
@@ -1902,9 +1905,11 @@ static VideoState *stream_open(FFPlayer *ffp, const char *filename, AVInputForma
is
->
video_clock_serial
=
-
1
;
is
->
av_sync_type
=
ffp
->
av_sync_type
;
ffp
->
is
=
is
;
is
->
video_refresh_tid
=
SDL_CreateThreadEx
(
&
is
->
_video_refresh_tid
,
video_refresh_thread
,
ffp
);
if
(
!
is
->
video_refresh_tid
)
{
av_free
(
is
);
av_free
p
(
&
ffp
->
is
);
return
NULL
;
}
...
...
@@ -1912,7 +1917,7 @@ static VideoState *stream_open(FFPlayer *ffp, const char *filename, AVInputForma
if
(
!
is
->
read_tid
)
{
is
->
abort_request
=
true
;
SDL_WaitThread
(
is
->
video_refresh_tid
,
NULL
);
av_free
(
is
);
av_free
(
&
ffp
->
is
);
return
NULL
;
}
return
is
;
...
...
@@ -2114,6 +2119,7 @@ int ffp_start_l(FFPlayer *ffp)
}
update_external_clock_pts
(
is
,
get_external_clock
(
is
));
is
->
paused
=
0
;
SDL_AoutPauseAudio
(
ffp
->
aout
,
is
->
paused
);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录