Skip to content
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

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

Closed
2 tasks done
prabhat00155 opened this issue May 10, 2021 · 4 comments
Closed
2 tasks done

Comments

@prabhat00155
Copy link
Contributor

prabhat00155 commented May 10, 2021

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

@prabhat00155 prabhat00155 self-assigned this May 10, 2021
@prabhat00155 prabhat00155 changed the title ffmpeg's AVSubtitleRect deprecated/removed attribute still used in torchvision Build failure with latest ffmpeg master caused by deprecated/removed attributes May 10, 2021
@bjuncek
Copy link
Contributor

bjuncek commented May 19, 2021

In addition to above here are few other things to consider changing (this list will be updated)

High (build failures)

see above

Low (warnings and incorrect usage)

prabhat00155 added a commit that referenced this issue Jun 1, 2021
* remove unused functions

* shut up annoying warnings via cast

* prabhat's comments

* Fixed clang format error

Co-authored-by: Prabhat Roy <prabhatroy@fb.com>
@bjuncek
Copy link
Contributor

bjuncek commented Jun 4, 2021

Since most of these have been closed I'm closing the issue.

@prabhat00155
Copy link
Contributor Author

Reopening as some changes had to be reverted.

@bjuncek
Copy link
Contributor

bjuncek commented Aug 13, 2021

Closing this since you fixed reverted changes :)

@bjuncek bjuncek closed this as completed Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants