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

Guard against some deprecated ffmpeg functionality #49

Closed dvzrv closed 2 years ago

dvzrv commented 2 years ago

This PR attempts to guard against some deprecated ffmpeg functionality.

However, https://github.com/x42/xjadeo/commit/aade82a427d4839e8db3816effcef16467e80dd6 does not work as intended, as it leads to:

xjadeo.c:1340:33: error: invalid initializer
xjadeo.c:1409:18: warning: assignment to ‘AVCodecContext *’ from incompatible pointer type ‘AVCodecParameters *’ [-Wincompatible-pointer-types]
 1409 |         pCodecCtx=pFormatCtx->streams[videoStream]->codecpar;
      |                  ^

Unfortunately I do not know how to do this any better. Suggestions welcome!

This does not yet provide compatibility with ffmpeg >= 5 though (also) for the same reasons as mentioned in https://github.com/x42/harvid/issues/8