1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2026-06-19 19:03:00 +02:00

avformat/matroskaenc: fix error code on LCEVC payload allocation failure

The branch returned the ret variable when av_malloc() failed, but ret
is uninitialized at that point unless an earlier branch happened to
set it.
This commit is contained in:
Zhao Zhili
2026-06-17 15:11:25 +08:00
committed by James Almer
parent ee39fe499f
commit 5c2f9899df
+1 -1
View File
@@ -2995,7 +2995,7 @@ static int mkv_write_block(void *logctx, MatroskaMuxContext *mkv,
lcevc = av_malloc(payload_size);
if (!lcevc)
return ret;
return AVERROR(ENOMEM);
AV_WB8 (lcevc + 0, ITU_T_T35_COUNTRY_CODE_UK);
AV_WB8 (lcevc + 1, 0); // t35_uk_country_code_second_octet