提交 69b723b1 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-10320: [mod_av] Playing a file with audio only with mod_av can crash when…

FS-10320: [mod_av] Playing a file with audio only with mod_av can crash when attempting to seek #resolve
上级 8dece92e
...@@ -1531,10 +1531,12 @@ static void *SWITCH_THREAD_FUNC file_read_thread_run(switch_thread_t *thread, vo ...@@ -1531,10 +1531,12 @@ static void *SWITCH_THREAD_FUNC file_read_thread_run(switch_thread_t *thread, vo
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "seeking to %" SWITCH_INT64_T_FMT "\n", context->seek_ts); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "seeking to %" SWITCH_INT64_T_FMT "\n", context->seek_ts);
avformat_seek_file(context->fc, stream_id, 0, context->seek_ts, INT64_MAX, 0); avformat_seek_file(context->fc, stream_id, 0, context->seek_ts, INT64_MAX, 0);
context->seek_ts = -2; context->seek_ts = -2;
context->video_st.next_pts = 0;
context->video_start_time = 0;
avcodec_flush_buffers(context->video_st.st->codec); if (context->has_video) {
context->video_st.next_pts = 0;
context->video_start_time = 0;
avcodec_flush_buffers(context->video_st.st->codec);
}
} }
if (context->has_video) { if (context->has_video) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论