提交 926a7f6a 编写于 作者: X Xinzheng Zhang

ff_ffplay: add a option for subtitle

上级 06900930
......@@ -2445,6 +2445,8 @@ static int stream_component_open(FFPlayer *ffp, int stream_index)
break;
case AVMEDIA_TYPE_SUBTITLE:
if (!ffp->subtitle) break;
is->subtitle_stream = stream_index;
is->subtitle_st = ic->streams[stream_index];
......
......@@ -550,6 +550,7 @@ typedef struct FFPlayer {
int loop;
int framedrop;
int64_t seek_at_start;
int subtitle;
int infinite_buffer;
enum ShowMode show_mode;
char *audio_codec_name;
......
......@@ -79,6 +79,8 @@ static const AVOption ffp_context_options[] = {
OPTION_OFFSET(framedrop), OPTION_INT(0, -1, 120) },
{ "seek-at-start", "set offset of player should be seeked",
OPTION_OFFSET(seek_at_start), OPTION_INT64(0, 0, INT_MAX) },
{ "subtitle", "decode subtitle stream",
OPTION_OFFSET(subtitle), OPTION_INT(0, 0, 1) },
// FFP_MERGE: window_title
#if CONFIG_AVFILTER
{ "af", "audio filters",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册