[FFmpeg-trac] #9288(avformat:new): avformat constify commit
FFmpeg
trac at avcodec.org
Thu Jun 10 05:19:14 EEST 2021
#9288: avformat constify commit
----------------------------------+--------------------------------------
Reporter: Mr-Dave | Type: defect
Status: new | Priority: normal
Component: avformat | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
Summary of the bug:
It seems the commits in the git master around
14fa0a4efbc989619860ed8ec0fd33dcdae558b0
now prevent the normal use of the api. The following is a sample that was
previously functional for setting up a MP4 container with HEVC.
#include <libavformat/avformat.h>
int main (int argc, const char **argv) {
AVFormatContext *format_context;
format_context = avformat_alloc_context();
format_context->oformat = av_guess_format("mp4", NULL, NULL);
format_context->oformat->video_codec = AV_CODEC_ID_HEVC;
avformat_close_input(&format_context);
return 0;
}
Compiler message:
error: assignment of member ‘video_codec’ in read-only object
format_context->oformat->video_codec = AV_CODEC_ID_HEVC;
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9288>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list