Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_25606643
ijkplayer
提交
65f99a94
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 搜索 >>
提交
65f99a94
编写于
10月 30, 2013
作者:
B
bbcallen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ff_ffplay: merge ffplay e84ca8d38a18deac55dbc2c9337a7588337039cc
上级
8eea73bb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
34 addition
and
29 deletion
+34
-29
ijkmedia/ijkplayer/ff_ffplay.c
ijkmedia/ijkplayer/ff_ffplay.c
+32
-29
ijkmedia/ijkplayer/ff_ffplay_def.h
ijkmedia/ijkplayer/ff_ffplay_def.h
+2
-0
未找到文件。
ijkmedia/ijkplayer/ff_ffplay.c
浏览文件 @
65f99a94
...
...
@@ -936,6 +936,9 @@ static int get_video_frame(FFPlayer *ffp, AVFrame *frame, AVPacket *pkt, int *se
frame
->
pts
,
g_vdps_counter
,
(
int64_t
)
avg_frame_time
,
fps
,
dur
);
#endif
if
(
!
got_picture
&&
!
pkt
->
data
)
is
->
video_finished
=
*
serial
;
if
(
got_picture
)
{
int
ret
=
1
;
double
dpts
=
NAN
;
...
...
@@ -1365,6 +1368,8 @@ static int audio_decode_frame(FFPlayer *ffp)
pkt_temp
->
size
-=
len1
;
if
((
pkt_temp
->
data
&&
pkt_temp
->
size
<=
0
)
||
(
!
pkt_temp
->
data
&&
!
got_frame
))
pkt_temp
->
stream_index
=
-
1
;
if
(
!
pkt_temp
->
data
&&
!
got_frame
)
is
->
audio_finished
=
is
->
audio_pkt_temp_serial
;
if
(
!
got_frame
)
continue
;
...
...
@@ -2154,6 +2159,33 @@ static int read_thread(void *arg)
SDL_UnlockMutex
(
wait_mutex
);
continue
;
}
if
(
!
is
->
paused
&&
(
!
is
->
audio_st
||
is
->
audio_finished
==
is
->
audioq
.
serial
)
&&
(
!
is
->
video_st
||
(
is
->
video_finished
==
is
->
videoq
.
serial
&&
is
->
pictq_size
==
0
)))
{
if
(
ffp
->
loop
!=
1
&&
(
!
ffp
->
loop
||
--
ffp
->
loop
))
{
stream_seek
(
is
,
ffp
->
start_time
!=
AV_NOPTS_VALUE
?
ffp
->
start_time
:
0
,
0
,
0
);
}
else
if
(
ffp
->
autoexit
)
{
ret
=
AVERROR_EOF
;
goto
fail
;
}
else
{
if
(
completed
)
{
SDL_LockMutex
(
wait_mutex
);
// infinite wait may block shutdown
while
(
!
is
->
abort_request
)
SDL_CondWaitTimeout
(
is
->
continue_read_thread
,
wait_mutex
,
10
);
SDL_UnlockMutex
(
wait_mutex
);
}
else
{
completed
=
1
;
ffp
->
auto_start
=
0
;
// TODO: 0 it's a bit early to notify complete here
ALOGE
(
"ffp_toggle_buffering: eof
\n
"
);
ffp_toggle_buffering
(
ffp
,
0
);
toggle_pause
(
ffp
,
1
);
ffp_notify_msg1
(
ffp
,
FFP_MSG_COMPLETED
);
}
}
}
if
(
eof
)
{
if
(
is
->
video_stream
>=
0
)
{
av_init_packet
(
pkt
);
...
...
@@ -2170,35 +2202,6 @@ static int read_thread(void *arg)
packet_queue_put
(
&
is
->
audioq
,
pkt
);
}
SDL_Delay
(
10
);
#ifdef FFP_MERGE
if
(
is
->
audioq
.
size
+
is
->
videoq
.
size
+
is
->
subtitleq
.
size
==
0
)
{
#else
if
(
is
->
audioq
.
size
+
is
->
videoq
.
size
==
0
)
{
#endif
if
(
ffp
->
loop
!=
1
&&
(
!
ffp
->
loop
||
--
ffp
->
loop
))
{
stream_seek
(
is
,
ffp
->
start_time
!=
AV_NOPTS_VALUE
?
ffp
->
start_time
:
0
,
0
,
0
);
}
else
if
(
ffp
->
autoexit
)
{
ret
=
AVERROR_EOF
;
goto
fail
;
}
else
{
if
(
completed
)
{
SDL_LockMutex
(
wait_mutex
);
// infinite wait may block shutdown
while
(
!
is
->
abort_request
)
SDL_CondWaitTimeout
(
is
->
continue_read_thread
,
wait_mutex
,
10
);
SDL_UnlockMutex
(
wait_mutex
);
}
else
{
completed
=
1
;
ffp
->
auto_start
=
0
;
// TODO: 0 it's a bit early to notify complete here
ALOGE
(
"ffp_toggle_buffering: eof
\n
"
);
ffp_toggle_buffering
(
ffp
,
0
);
toggle_pause
(
ffp
,
1
);
ffp_notify_msg1
(
ffp
,
FFP_MSG_COMPLETED
);
}
}
}
eof
=
0
;
continue
;
}
...
...
ijkmedia/ijkplayer/ff_ffplay_def.h
浏览文件 @
65f99a94
...
...
@@ -153,6 +153,8 @@ typedef struct VideoState {
#endif
AVFormatContext
*
ic
;
int
realtime
;
int
audio_finished
;
int
video_finished
;
Clock
audclk
;
Clock
vidclk
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录