summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/AVIDump.cpp
diff options
context:
space:
mode:
authorGlenn Rice <glennricster@gmail.com>2011-11-22 19:24:05 -0600
committerGlenn Rice <glennricster@gmail.com>2011-11-22 19:24:05 -0600
commite5d051a4e977443785f4e78cb6464eca0408e578 (patch)
tree934b4dd3d26584a74df93c81ddffcbe033c9bf0a /Source/Core/VideoCommon/Src/AVIDump.cpp
parent29f52ce6dd8b16773b48936cda80d434143966f1 (diff)
Update linux libav frame dump code for recent api changes.
Diffstat (limited to 'Source/Core/VideoCommon/Src/AVIDump.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/AVIDump.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/Src/AVIDump.cpp b/Source/Core/VideoCommon/Src/AVIDump.cpp
index a5a6098489..469e00d9f5 100644
--- a/Source/Core/VideoCommon/Src/AVIDump.cpp
+++ b/Source/Core/VideoCommon/Src/AVIDump.cpp
@@ -267,8 +267,6 @@ bool AVIDump::CreateFile()
s_Stream->codec->gop_size = 12;
s_Stream->codec->pix_fmt = g_Config.bUseFFV1 ? PIX_FMT_BGRA : PIX_FMT_YUV420P;
- av_set_parameters(s_FormatContext, NULL);
-
if (!(codec = avcodec_find_encoder(s_Stream->codec->codec_id)) ||
(avcodec_open(s_Stream->codec, codec) < 0))
{
@@ -287,14 +285,14 @@ bool AVIDump::CreateFile()
s_OutBuffer = new uint8_t[s_size];
NOTICE_LOG(VIDEO, "Opening file %s for dumping", s_FormatContext->filename);
- if (url_fopen(&s_FormatContext->pb, s_FormatContext->filename, URL_WRONLY) < 0)
+ if (avio_open(&s_FormatContext->pb, s_FormatContext->filename, AVIO_FLAG_WRITE) < 0)
{
WARN_LOG(VIDEO, "Could not open %s", s_FormatContext->filename);
CloseFile();
return false;
}
- av_write_header(s_FormatContext);
+ avformat_write_header(s_FormatContext, NULL);
return true;
}
@@ -374,7 +372,7 @@ void AVIDump::CloseFile()
if (s_FormatContext)
{
if (s_FormatContext->pb)
- url_fclose(s_FormatContext->pb);
+ avio_close(s_FormatContext->pb);
av_free(s_FormatContext);
s_FormatContext = NULL;
}