Set `dstDepth` when input is `stdin`
diff --git a/apps/avifenc.c b/apps/avifenc.c
index a4dd41f..3aa1c22 100644
--- a/apps/avifenc.c
+++ b/apps/avifenc.c
@@ -387,6 +387,9 @@
             fprintf(stderr, "ERROR: Cannot read y4m through standard input");
             return AVIF_FALSE;
         }
+        if (dstDepth) {
+            *dstDepth = dstImage->depth;
+        }
         assert(dstImage->yuvFormat != AVIF_PIXEL_FORMAT_NONE);
         if (dstSourceIsRGB) {
             *dstSourceIsRGB = AVIF_FALSE;