Fix(record): correct MJPEG upside-down playback

and remove 0-byte AVI residue on encoder open failure
This commit is contained in:
yuanyuanxiang committed 2026-05-23 13:37:28 +02:00
1 parent 99fc15ae41
commit 92bf9c9ccb
5 files changed
+17 -7

No files matched your search

+5 -4
View File
@@ -1,6 +1,7 @@
#pragma once
#include <Vfw.h>
#pragma comment(lib,"Vfw32.lib")
#include "LangManager.h"
#define ERR_INVALID_PARAM 1
#define ERR_NO_ENCODER 2
@@ -30,13 +31,13 @@ public:
{
switch (result) {
case ERR_INVALID_PARAM:
return ("无效参数");
return _L("无效参数").GetString();
case ERR_NOT_SUPPORT:
return ("不支持的位深度,需要24位或32位");
return _L("不支持的位深度,需要24位或32位").GetString();
case ERR_NO_ENCODER:
return ("未安装x264编解码器 \n下载地址:https://sourceforge.net/projects/x264vfw");
return _L("未安装x264编解码器 \n下载地址:https://sourceforge.net/projects/x264vfw").GetString();
case ERR_INTERNAL:
return("创建AVI文件失败");
return _L("创建AVI文件失败").GetString();
default:
return "succeed";
}