Skip to content

Build failure with latest ffmpeg master caused by deprecated/removed attributes #3805

@prabhat00155

Description

@prabhat00155

Building torchvision from source with latest ffmpeg(installed from source) throws a number of errors:

/Users/prabhatroy/Documents/pytorch/repos/vision/torchvision/csrc/io/decoder/util.cpp:52:25: error: no member named 'pict' in 'AVSubtitleRect'
          s += sizeof(y.pict.linesize[i]);
                      ~ ^

The reason is that ffmpeg's AVSubtitleRect's pict attribute was deprecated in 3.0 and removed in the latest master.

/Users/prabhatroy/Documents/pytorch/repos/vision/torchvision/csrc/io/decoder/stream.cpp:235:19: error: use of undeclared identifier 'av_frame_get_best_effort_timestamp'
    header->pts = av_frame_get_best_effort_timestamp(frame_);
                  ^
1 error generated.

av_frame_get_best_effort_timestamp() was deprecated in ffmpeg 4.0 and removed from the latest master.

We need to update its usage in torchvision.

cc @bjuncek

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions