Skip to content

Update of FFmpeg to n7.1 #5681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions conda/third_party/dali_ffmpeg/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{% set build_version = "7.0.2" %}
{% set build_version = "7.1" %}

package:
name: dali-ffmpeg
version: {{ build_version }}

source:
fn: FFmpeg-n7.0.2.tar.gz
url: https://developer.download.nvidia.com/compute/redist/nvidia-dali/FFmpeg-n7.0.2.tar.gz
sha256: 5eb46d18d664a0ccadf7b0adee03bd3b7fa72893d667f36c69e202a807e6d533
fn: FFmpeg-n7.1.tar.gz
url: https://developer.download.nvidia.com/compute/redist/nvidia-dali/FFmpeg-n7.1.tar.gz
sha256: 7ddad2d992bd250a6c56053c26029f7e728bebf0f37f80cf3f8a0e6ec706431a

build:
number: 0
Expand Down
1 change: 1 addition & 0 deletions dali/operators/reader/loader/video/frames_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ void FramesDecoder::SeekFrame(int frame_id) {

// Seeking clears av buffers, so reset flush state info
if (flush_state_) {
while (ReadFlushFrame(nullptr, false)) {}
Copy link
Member

@stiepan stiepan Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it help or what was wrong with it before?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently avcodec_flush_buffers doesn't clean decoder buffers properly anymore, and when we switch to the next file there are frames left in the buffer, and we cannot feed more frames to the decoder without reading them first. So this is an additional mechanism to clean the decoder output buffer as avcodec_flush_buffers (or the particular decoder implementation that should do that) doesn't fully work as we expect anymore. When works it should be noop.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish we could narrow it down to a particular change in the codec...

flush_state_ = false;
}

Expand Down
Loading