Skip to content

Commit

Permalink
Support ffmpeg 7.0
Browse files Browse the repository at this point in the history
Closes #832
  • Loading branch information
shssoichiro committed May 10, 2024
1 parent 086f89d commit 6db3966
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
35 changes: 14 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion av1an-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ features = ["const_generics", "const_new", "union"]

[dependencies.ffmpeg]
package = "ffmpeg-the-third"
version = "1.2.0"
version = "2.0.1"
features = ["serialize"]

[dependencies.plotters]
Expand Down
2 changes: 2 additions & 0 deletions av1an-core/src/ffmpeg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pub fn num_frames(source: &Path) -> Result<usize, ffmpeg::Error> {
Ok(
ictx
.packets()
.filter_map(Result::ok)
.filter(|(stream, _)| stream.index() == video_stream_index)
.count(),
)
Expand Down Expand Up @@ -122,6 +123,7 @@ pub fn get_keyframes(source: &Path) -> Result<Vec<usize>, ffmpeg::Error> {

let kfs = ictx
.packets()
.filter_map(Result::ok)
.filter(|(stream, _)| stream.index() == video_stream_index)
.map(|(_, packet)| packet)
.enumerate()
Expand Down
2 changes: 1 addition & 1 deletion av1an/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ features = ["git", "git2", "build", "rustc", "cargo"]

[dependencies.ffmpeg]
package = "ffmpeg-the-third"
version = "1.2.0"
version = "2.0.1"
features = ["serialize"]

[features]
Expand Down

0 comments on commit 6db3966

Please sign in to comment.