ros-misc-utilities / ffmpeg_image_transport

ROS2 image transport plugin for encoding/decoding with h264 codec
Apache License 2.0
65 stars 22 forks source link

Fix invalid conversion from 'const AVCodec*' to 'AVCodec*' #11

Closed wentasah closed 1 year ago

wentasah commented 1 year ago

When compiling with libavcodec version 59.37.100 and GCC 12.3.0 I get the following error message:

src/ffmpeg_encoder.cpp: In member function 'bool ffmpeg_image_transport::FFMPEGEncoder::openCodec(int, int)':
src/ffmpeg_encoder.cpp:97:51: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive]

The change in libavcodec that causes this was introduced in https://github.com/FFmpeg/FFmpeg/commit/626535f6a169e2d821b969e0ea77125ba7482113, and appeared first in version 59.0.100.

This commit fixes the error.

berndpfrommer commented 1 year ago

Thanks!