CCExtractor / ccextractor

CCExtractor - Official version maintained by the core team

Home Page:https://www.ccextractor.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Building using CMake with `-DWITH_HARDSUBX=ON` gives a compilation error.

ArchitBhonsle opened this issue · comments

version: 0.94

In raising this issue, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • I have checked that the issue I'm posting isn't already reported.
  • I have checked that the issue I'm porting isn't already solved and no duplicates exist in closed issues and in opened issues
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I have used the latest available version of CCExtractor to verify this issue exists.
  • I have ticked all the boxes in this section and to prove it I'm deleting the section completely to remove boilerplate text.

Necessary information

  • Is this a regression (i.e. did it work before)? Yes, assuming it worked before
  • What platform did you use? Linux
  • What were the used arguments? This was during compilation

Video links

Additional information

As explained in the compilation docs I ran cmake ../src -DWITH_HARDSUBX=ON followed by make and got the compilation failed with the following error. (There are more logs on top but these seem to be the relevant ones)

/home/puipuituipui/Dev/code/Forks/ccextractor/src/lib_ccx/hardsubx.c: In function ‘hardsubx_process_data’:
/home/puipuituipui/Dev/code/Forks/ccextractor/src/lib_ccx/hardsubx.c:16:9: warning: implicit declaration of function ‘av_register_all’ [-Wimplicit-function-declaration]
   16 |         av_register_all();
      |         ^~~~~~~~~~~~~~~
/home/puipuituipui/Dev/code/Forks/ccextractor/src/lib_ccx/hardsubx.c:35:48: error: ‘AVStream’ has no member named ‘codec’
   35 |                 if (ctx->format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
      |                                                ^~
/home/puipuituipui/Dev/code/Forks/ccextractor/src/lib_ccx/hardsubx.c:46:72: error: ‘AVStream’ has no member named ‘codec’
   46 |         ctx->codec_ctx = ctx->format_ctx->streams[ctx->video_stream_id]->codec;
      |                                                                        ^~
/home/puipuituipui/Dev/code/Forks/ccextractor/src/lib_ccx/hardsubx.c:47:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   47 |         ctx->codec = avcodec_find_decoder(ctx->codec_ctx->codec_id);
      |                    ^
/home/puipuituipui/Dev/code/Forks/ccextractor/src/lib_ccx/hardsubx.c: In function ‘_init_hardsubx’:
/home/puipuituipui/Dev/code/Forks/ccextractor/src/lib_ccx/hardsubx.c:228:22: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  228 |         char *lang = options->ocrlang;
      |                      ^~~~~~~
/home/puipuituipui/Dev/code/Forks/ccextractor/src/lib_ccx/hardsubx.c: In function ‘hardsubx_process_data’:
/home/puipuituipui/Dev/code/Forks/ccextractor/src/lib_ccx/hardsubx.c:121:1: warning: control reaches end of non-void function [-Wreturn-type]
  121 | }
      | ^
make[2]: *** [lib_ccx/CMakeFiles/ccx.dir/build.make:1994: lib_ccx/CMakeFiles/ccx.dir/hardsubx.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:145: lib_ccx/CMakeFiles/ccx.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Using the build_hardsubx script gives the same error message.

Being fixed in #1479, duplicate of #1418

Sorry for the dupe. Should I close and mark as completed?

yes as this is a duplicate