leandromoreira / ffmpeg-libav-tutorial

FFmpeg libav tutorial - learn how media works from basic to transmuxing, transcoding and more. Translations: πŸ‡ΊπŸ‡Έ πŸ‡¨πŸ‡³ πŸ‡°πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡»πŸ‡³ πŸ‡§πŸ‡·
https://github.com/leandromoreira/ffmpeg-libav-tutorial
BSD 3-Clause "New" or "Revised" License
9.93k stars 956 forks source link

replace AVCodec * with const AVCodec * to read codec information #115

Open developer0hye opened 2 years ago

developer0hye commented 2 years ago

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 commented 2 years ago

@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

leandromoreira commented 2 years ago

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

developer0hye commented 2 years ago

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

leandromoreira commented 2 years ago

ffmpeg

Thank you :)

AndreiCherniaev commented 1 year ago

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

I have the same commit please check.