diff --git a/QtScrcpy/recorder/recorder.cpp b/QtScrcpy/recorder/recorder.cpp index 702d0be..0feb356 100644 --- a/QtScrcpy/recorder/recorder.cpp +++ b/QtScrcpy/recorder/recorder.cpp @@ -72,7 +72,9 @@ bool Recorder::open(AVCodec *inputCodec) int ret = avio_open(&m_formatCtx->pb, m_fileName.toUtf8().toStdString().c_str(), AVIO_FLAG_WRITE); if (ret < 0) { - qCritical(QString("Failed to open output file: %1").arg(m_fileName).toUtf8().toStdString().c_str()); + char errorbuf[255] = { 0 }; + av_strerror(ret, errorbuf, 254); + qCritical(QString("Failed to open output file: %1 %2").arg(errorbuf).arg(m_fileName).toUtf8().toStdString().c_str()); // ostream will be cleaned up during context cleaning avformat_free_context(m_formatCtx); m_formatCtx = Q_NULLPTR; @@ -121,7 +123,7 @@ const AVOutputFormat *Recorder::findMp4Muxer() #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58, 9, 100) outFormat = av_muxer_iterate(&opaque); #else - outFormat = av_oformat_next(oformat); + outFormat = av_oformat_next(outFormat); #endif // until null or with name "mp4" } while (outFormat && strcmp(outFormat->name, "mp4")); diff --git a/backup/myconfig.sh b/backup/myconfig.sh new file mode 100755 index 0000000..3d72c95 --- /dev/null +++ b/backup/myconfig.sh @@ -0,0 +1,4 @@ +./configure --disable-everything --disable-x86asm --prefix=../ffmpeg_build \ + --enable-shared --enable-static \ + --enable-decoder=h264 --enable-parser=h264 --enable-demuxer=h264 \ + --enable-muxer=mp4 --enable-protocol=file diff --git a/third_party/ffmpeg/lib/libavcodec.a b/third_party/ffmpeg/lib/libavcodec.a index a7c7c47..2b22e24 100644 Binary files a/third_party/ffmpeg/lib/libavcodec.a and b/third_party/ffmpeg/lib/libavcodec.a differ diff --git a/third_party/ffmpeg/lib/libavformat.a b/third_party/ffmpeg/lib/libavformat.a index fda4466..33594ba 100644 Binary files a/third_party/ffmpeg/lib/libavformat.a and b/third_party/ffmpeg/lib/libavformat.a differ diff --git a/third_party/ffmpeg/lib/libavutil.a b/third_party/ffmpeg/lib/libavutil.a index 2a8b40e..7a532e1 100644 Binary files a/third_party/ffmpeg/lib/libavutil.a and b/third_party/ffmpeg/lib/libavutil.a differ diff --git a/third_party/ffmpeg/lib/libswresample.a b/third_party/ffmpeg/lib/libswresample.a index 1a8bf68..7097922 100644 Binary files a/third_party/ffmpeg/lib/libswresample.a and b/third_party/ffmpeg/lib/libswresample.a differ diff --git a/third_party/ffmpeg/lib/libswscale.a b/third_party/ffmpeg/lib/libswscale.a index 9108007..e2e204b 100644 Binary files a/third_party/ffmpeg/lib/libswscale.a and b/third_party/ffmpeg/lib/libswscale.a differ