ffmpeg-libav-tutorial icon indicating copy to clipboard operation
ffmpeg-libav-tutorial copied to clipboard

replace AVCodec * with const AVCodec * to read codec information

Open developer0hye opened this issue 2 years ago β€’ 5 comments

Thanks for writing the great tutorial!

I found some problem having been following your code.

The return type of avcodec_find_decoder is changed Avcodec* to const AVCodec*.

https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/codec.h#L266

developer0hye avatar Jun 03 '22 14:06 developer0hye

@leandromoreira

Could you review this PR?

The official example code also uses const*.

https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/decode_video.c#L86

developer0hye avatar Jun 10 '22 14:06 developer0hye

Thanks @developer0hye did you test using the current docker ffmpeg image to see if everything works fine?

leandromoreira avatar Jul 06 '22 11:07 leandromoreira

@leandromoreira Sorry, I didn't check it with current docker ffmpeg image. After checking it, I will tell you about it.

developer0hye avatar Jul 17 '22 06:07 developer0hye

ffmpeg

Thank you :)

leandromoreira avatar Jul 22 '22 23:07 leandromoreira

The return type of avcodec_find_decoder is changed Avcodec* to const AVCodec*.

I have the same commit please check.

AndreiCherniaev avatar Sep 17 '23 07:09 AndreiCherniaev