Skip to content

videoio: build issues with upcoming FFmpeg 5.0 #20147

@crackwitz

Description

@crackwitz

related:
https://forum.opencv.org/t/error-avstream-aka-struct-avstream-has-no-member-named-codec/3506

ffmpeg changed its AVStream structure. in ffmpeg v3.1 (~2016) the codecpar member was introduced to replace codec member. codec has been deprecated since then. it is still available in ffmpeg v4.4 but not in the master branch.

availability is modulated by #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59)

this version was bumped to 59 a month ago in FFmpeg/FFmpeg@85ba17f

OpenCV v4.5.2/master still assumes the existence of the codec member:

avcodec_close( video_st->codec );

I've checked issues and pull requests for mentions of codecpar and it seems this hasn't been reported yet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions