Fix(record): correct MJPEG upside-down playback

and remove 0-byte AVI residue on encoder open failure
This commit is contained in:
yuanyuanxiang
2026-05-23 12:09:14 +02:00
parent 99fc15ae41
commit 92bf9c9ccb
5 changed files with 17 additions and 7 deletions

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";
}