anyc / avcut

Frame-accurate video cutting with only small quality loss
GNU General Public License v2.0
112 stars 13 forks source link

This doesn't compile with newer libavcodec #14

Closed gCurse closed 6 years ago

gCurse commented 6 years ago

I get the following errors: avcut.c:157:31: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ´AV_CODEC_FLAG_GLOBAL_HEADER´? and avcut.c:482:93: error: ‘CODEC_CAP_DELAY’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_DELAY’? Two times each.

Seems libavcodec is too new? libavcodec 58.18.100

The following works for me but I have no idea which lowest version introduced the change: #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58,18,100) #define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER #define CODEC_CAP_DELAY AV_CODEC_CAP_DELAY #endif EDIT: Found this: line 38ff. So its version 56.56.0??

anyc commented 6 years ago

I'm not sure either but it looks good. Thanks for the help!