Skip to content

Commit 0fd00a8

Browse files
committed
Fixed warnings in VP8.Nt project.
1 parent 1060ee0 commit 0fd00a8

4 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/VP8.Net/VP8.Net.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
<PropertyGroup>
44
<TargetFramework>net10.0</TargetFramework>
5-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
5+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
6+
<NoWarn>$(NoWarn);CS1570;CS1573;CS1591;CS1587;CS8981</NoWarn>
67
</PropertyGroup>
78

89
<PropertyGroup>

src/VP8.Net/VP8Codec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public byte[] EncodeVideo(int width, int height, byte[] sample, VideoPixelFormat
161161
// Convert the input sample into planar I420.
162162
byte[] i420 = (pixelFormat == VideoPixelFormatsEnum.I420)
163163
? sample
164-
: PixelConverter.ToI420(width, height, sample, pixelFormat);
164+
: PixelConverter.ToI420(width, height, width, sample, pixelFormat);
165165

166166
int ySize = width * height;
167167
int cSize = (width / 2) * (height / 2);

src/VP8.Net/onyxd_if.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,18 +353,18 @@ public static int vp8dx_get_raw_frame(VP8D_COMP pbi, ref YV12_BUFFER_CONFIG sd,
353353

354354
//(void)flags;
355355

356-
if (pbi.common.frame_to_show != null)
357-
{
356+
//if (pbi.common.frame_to_show != null)
357+
//{
358358
sd = pbi.common.frame_to_show;
359359
sd.y_width = pbi.common.Width;
360360
sd.y_height = pbi.common.Height;
361361
sd.uv_height = pbi.common.Height / 2;
362362
ret = 0;
363-
}
364-
else
365-
{
366-
ret = -1;
367-
}
363+
//}
364+
//else
365+
//{
366+
// ret = -1;
367+
//}
368368

369369
// Port AC: Noop in libvpx.
370370
//vpx_clear_system_state();

src/VP8.Net/vpx_decoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public static vpx_image_t vpx_codec_get_frame(vpx_codec_ctx_t ctx, vpx_codec_ite
305305
{
306306
vpx_image_t img;
307307

308-
if (ctx == null || iter == null|| ctx.iface == null || ctx.priv == null)
308+
if (ctx == null || ctx.iface == null || ctx.priv == null)
309309
{
310310
img = null;
311311
}

0 commit comments

Comments
 (0)