From a2d19baaa3996bc63edc042230074fb84a2433a1 Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期二, 03 十二月 2019 19:57:03 +0800 Subject: [PATCH] 修改bug --- csrc/ffmpeg/format/FormatOut.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/csrc/ffmpeg/format/FormatOut.cpp b/csrc/ffmpeg/format/FormatOut.cpp index 60efd59..e832bfe 100644 --- a/csrc/ffmpeg/format/FormatOut.cpp +++ b/csrc/ffmpeg/format/FormatOut.cpp @@ -399,7 +399,7 @@ int out_idx = -1; std::vector<AVStream*> in_streams{in_v_stream_, in_a_stream_}; for (auto i : in_streams){ - if (i->index == pkt->stream_index){ + if (i && (i->index == pkt->stream_index)){ if (i->codecpar->codec_type == AVMEDIA_TYPE_VIDEO){ out_idx = v_idx_; in_stream = i; -- Gitblit v1.8.0