ropensci / av

Working with Video in R
https://docs.ropensci.org/av
Other
92 stars 10 forks source link

Breaking API change in ffmpeg-5 #40

Closed jeroen closed 2 years ago

jeroen commented 2 years ago

Our code currently uses the AVStream->cur_dts field to synchronize the audio and video streams. However this field was removed from the public header in ffmpeg-5.

https://github.com/ropensci/av/blob/8f70dcaa67c039a9be52b19584894684a2d22b60/src/video.c#L376-L377

I am not sure what API we need to use instead. @jamrial do you have any suggestion?

jamrial commented 2 years ago

If you need something like that field, then you should keep track of the last returned dts from the stream in question within your code.

See https://github.com/FFmpeg/FFmpeg/commit/ab4f299e237708e81af473c88ec5acf0dd13d8eb for how it was handled in ffmpeg.c