Skip to content

Commit a3768ad

Browse files
committed
android 使用mp4容器
1 parent ea402ec commit a3768ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ijkmedia/ijkplayer/ff_ffplay.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5239,7 +5239,11 @@ int ffp_start_record(FFPlayer *ffp, const char *file_name)
52395239
goto end;
52405240
}
52415241
// 初始化一个用于输出的AVFormatContext结构体
5242-
avformat_alloc_output_context2(&ffp->m_ofmt_ctx, NULL, "mov", file_name);
5242+
#if defined(__ANDROID__)
5243+
avformat_alloc_output_context2(&ffp->m_ofmt_ctx, NULL, "mp4", file_name);
5244+
#else
5245+
avformat_alloc_output_context2(&ffp->m_ofmt_ctx, NULL, "mov", file_name);
5246+
#endif
52435247
if (!ffp->m_ofmt_ctx) {
52445248
av_log(ffp, AV_LOG_ERROR, "===Could not create output context filename is %s\n", file_name);
52455249
goto end;

0 commit comments

Comments
 (0)