Avoid deprecated av_register_all with version check.
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user