decord icon indicating copy to clipboard operation
decord copied to clipboard

Bug fix for invalid conversion from AVCodec** to const AVCodec**

Open SamMaoYS opened this issue 2 years ago • 2 comments

Environment

Ubuntu 23.04 lunar gcc version 12.3.0 ffmpeg version n4.3.1

Issue

During compiling:

decord/src/video/video_reader.cc:149:88: error: invalid conversion from ‘AVCodec**’ to ‘const AVCodec**’ [-fpermissive]
  149 |     int st_nb = av_find_best_stream(fmt_ctx_.get(), AVMEDIA_TYPE_VIDEO, stream_nb, -1, &dec, 0);
      |                                                                                        ^~~~
      |                                                                                        |
      |                                                                                        AVCodec**

Fix

Convert AVCodec* to const AVCodec* for the dec

SamMaoYS avatar Sep 13 '23 09:09 SamMaoYS

@CodiumAi-Agent /review

GadiZimerman avatar Dec 28 '23 19:12 GadiZimerman

How did you fix this in the video_reader.cc file?

JamesMcCullochDickens avatar Mar 29 '24 15:03 JamesMcCullochDickens