Bug 270226

Summary: multimedia/ffms2: Update to latest commit (2023-02-13)
Product: Ports & Packages Reporter: Daniel Engberg <diizzy>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 261302    
Attachments:
Description Flags
Patch for ffms2 none

Description Daniel Engberg freebsd_committer freebsd_triage 2023-03-14 23:01:54 UTC
Created attachment 240860 [details]
Patch for ffms2

Fixes build with FFmpeg 6.0

Compile tested on FreeBSD 13.2-BETA1 (amd64)
Poudriere testport OK 12.3-RELEASE (amd64)
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-03-15 12:48:12 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=546e957ac8428c8adc2e46faf371d41a247b170c

commit 546e957ac8428c8adc2e46faf371d41a247b170c
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-03-15 12:45:39 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-03-15 12:46:49 +0000

    multimedia/ffms2: unbreak with ffmpeg 5.0

    src/core/videosource.cpp:174:18: error: cannot initialize a variable of type 'AVCodec *' with an rvalue of type 'const AVCodec *'
            AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id);
                     ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/core/audiosource.cpp:466:14: error: cannot initialize a variable of type 'AVCodec *' with an rvalue of type 'const AVCodec *'
        AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id);
                 ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/core/indexing.cpp:387:14: error: cannot initialize a variable of type 'AVCodec *' with an rvalue of type 'const AVCodec *'
        AVCodec *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id);
                 ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/core/indexing.cpp:405:22: error: cannot initialize a variable of type 'AVCodec *' with an rvalue of type 'const AVCodec *'
                AVCodec *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
                         ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/core/indexing.cpp:436:22: error: cannot initialize a variable of type 'AVCodec *' with an rvalue of type 'const AVCodec *'
                AVCodec *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
                         ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    PR:             270226
    Obtained from:  upstream

 multimedia/ffms2/Makefile | 6 ++++++
 multimedia/ffms2/distinfo | 6 ++++++
 2 files changed, 12 insertions(+)