diff --git a/crates/ec-h265/tests/encode.rs b/crates/ec-h265/tests/encode.rs index 4d32e1b0..5d931c99 100644 --- a/crates/ec-h265/tests/encode.rs +++ b/crates/ec-h265/tests/encode.rs @@ -740,11 +740,17 @@ fn clip_sources(path: &std::ffi::OsStr, want: usize) -> (usize, usize, Vec().ok()?, h.parse::().ok()?))) - .expect("ffprobe returned dimensions"); + // ffprobe prints one comma-separated line per stream, and recent builds + // end it with a trailing separator, so the fields are taken by position + // rather than by splitting the line in two. + let mut fields = csv.lines().next().unwrap_or_default().split(','); + let (w, h) = (|| { + Some(( + fields.next()?.trim().parse::().ok()?, + fields.next()?.trim().parse::().ok()?, + )) + })() + .unwrap_or_else(|| panic!("ffprobe returned dimensions, got {csv:?}")); // Pictures to pass over before sampling: the head of a film is titles and // fades, which are not what a codec is measured on. let skip: usize = std::env::var("EC_H265_CLIP_SKIP")