diff --git a/Source_Files/main.cpp b/Source_Files/main.cpp index 70181f3..cd71b93 100644 --- a/Source_Files/main.cpp +++ b/Source_Files/main.cpp @@ -3,7 +3,7 @@ int main(int argc, char *argv[]) { - std::cout<<"ximeaAirborneSystem 版本:"<< "41." <pb, outputVideoPath, AVIO_FLAG_WRITE) < 0) - { - qDebug() << "Error: Failed to open output file"; - avcodec_close(codecContext); - avcodec_free_context(&codecContext); - avformat_free_context(formatContext); - return; - } +// if (avio_open(&formatContext->pb, outputVideoPath, AVIO_FLAG_WRITE) < 0) +// { +// qDebug() << "Error: Failed to open output file"; +// avcodec_close(codecContext); +// avcodec_free_context(&codecContext); +// avformat_free_context(formatContext); +// return; +// } // 写入文件头 - avformat_write_header(formatContext, nullptr); +// avformat_write_header(formatContext, nullptr); // 使用sws_scale进行颜色空间转换 SwsContext* swsContext = sws_getContext(m_iWidth, m_iHeight, AV_PIX_FMT_BGR24, @@ -1345,7 +1345,7 @@ void PushFlow::encodePushFlow() fclose(fp); // 写入文件尾 - av_write_trailer(formatContext); +// av_write_trailer(formatContext); // 释放AVFrame和相关资源 av_freep(&frame->data[0]);