x42 / xjadeo

X JAck viDEo mOnitor: a tool that displays a video clip in sync with an external time source (jack-transport, LTC and MTC). Applications include: soundtrack composition/editing, video monitoring and -installations.
http://xjadeo.sf.net/
GNU General Public License v2.0
43 stars 7 forks source link

Unable to build against ffmpeg >= 5 #50

Closed dvzrv closed 2 years ago

dvzrv commented 2 years ago

Hi! Similar to the issues with harvid (https://github.com/x42/harvid/issues/8) I am also unable to build xjadeo against ffmpeg >= 5. I was able to (partially) fix some of the deprecations in #49 but I am stuck with the same issue in regards to AVPicture (after applying the patches from the aforementioned PR):

xjadeo.c:444:34: error: ‘AVPicture’ undeclared (first use in this function); did you mean ‘AVPictureType’?
  444 |                 avpicture_fill ((AVPicture *)pFrameFMT, buffer, render_fmt, movie_width, movie_height);
      |                                  ^~~~~~~~~
      |                                  AVPictureType
xjadeo.c:444:34: note: each undeclared identifier is reported only once for each function it appears in
xjadeo.c:444:45: error: expected expression before ‘)’ token
  444 |                 avpicture_fill ((AVPicture *)pFrameFMT, buffer, render_fmt, movie_width, movie_height);
      |                                             ^

Full build log: xjadeo-0.8.10-build.log

x42 commented 2 years ago

Can you try to replace the line with

av_image_fill_arrays (pFrameFMT->data, pFrameFMT->linesize, buffer, render_fmt, movie_width, movie_height, 0);
x42 commented 2 years ago

Should be fixed since 9f62448b87dc345eb6e15b8e24b54339384c6ccb

dvzrv commented 2 years ago

Hm, I don't think so.

You merged https://github.com/x42/xjadeo/pull/49 a bit too fast. As mentioned in https://github.com/x42/xjadeo/pull/49#issue-1123445655 that commit does not work as intended (it does not build with it) and I wanted to find a better fix for it. Sorry, if that was not clear :S