Avoid deprecated av_register_all with version check.

This commit is contained in:
Nekotekina 2020-02-23 20:45:16 +03:00
parent 1a702de9e4
commit 1dc2eb1cc8
2 changed files with 13 additions and 2 deletions

View file

@ -315,8 +315,8 @@ public:
, cbFunc(func) , cbFunc(func)
, cbArg(arg) , cbArg(arg)
{ {
av_register_all(); //av_register_all();
avcodec_register_all(); //avcodec_register_all();
switch (type) switch (type)
{ {

View file

@ -132,7 +132,18 @@ struct vdec_context final
, cb_func(func) , cb_func(func)
, cb_arg(arg) , cb_arg(arg)
{ {
#ifdef _MSC_VER
#pragma warning(push, 0)
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
avcodec_register_all(); avcodec_register_all();
#ifdef _MSC_VER
#pragma warning(pop)
#else
#pragma GCC diagnostic pop
#endif
switch (type) switch (type)
{ {