mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 09:59:32 -06:00
Update libav code to remove deprecation warnings.
This commit is contained in:
@ -252,7 +252,7 @@ bool AVIDump::CreateFile()
|
|||||||
File::CreateFullPath(s_FormatContext->filename);
|
File::CreateFullPath(s_FormatContext->filename);
|
||||||
|
|
||||||
if (!(s_FormatContext->oformat = av_guess_format("avi", NULL, NULL)) ||
|
if (!(s_FormatContext->oformat = av_guess_format("avi", NULL, NULL)) ||
|
||||||
!(s_Stream = av_new_stream(s_FormatContext, 0)))
|
!(s_Stream = avformat_new_stream(s_FormatContext, codec)))
|
||||||
{
|
{
|
||||||
CloseFile();
|
CloseFile();
|
||||||
return false;
|
return false;
|
||||||
@ -269,7 +269,7 @@ bool AVIDump::CreateFile()
|
|||||||
s_Stream->codec->pix_fmt = g_Config.bUseFFV1 ? PIX_FMT_BGRA : PIX_FMT_YUV420P;
|
s_Stream->codec->pix_fmt = g_Config.bUseFFV1 ? PIX_FMT_BGRA : PIX_FMT_YUV420P;
|
||||||
|
|
||||||
if (!(codec = avcodec_find_encoder(s_Stream->codec->codec_id)) ||
|
if (!(codec = avcodec_find_encoder(s_Stream->codec->codec_id)) ||
|
||||||
(avcodec_open(s_Stream->codec, codec) < 0))
|
(avcodec_open2(s_Stream->codec, codec, NULL) < 0))
|
||||||
{
|
{
|
||||||
CloseFile();
|
CloseFile();
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user