75 lines
4.5 KiB
Diff
75 lines
4.5 KiB
Diff
commit e4396ee8a6010c03dca976c8204c29d1da1ec299
|
|
Author: Alexis Ballier <aballier@gentoo.org>
|
|
Date: Thu Mar 1 10:33:19 2012 -0300
|
|
|
|
Replace av_write_header by avformat_write_header.
|
|
|
|
The former is gone in libavformat 54.
|
|
|
|
diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h
|
|
index 3c7f9fa..df946ee 100644
|
|
--- a/lib/DllAvFormat.h
|
|
+++ b/lib/DllAvFormat.h
|
|
@@ -103,7 +103,7 @@ public:
|
|
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
|
|
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
|
|
offset_t (*seek)(void *opaque, offset_t offset, int whence))=0;
|
|
- virtual int av_write_header (AVFormatContext *s)=0;
|
|
+ virtual int avformat_write_header (AVFormatContext *s, AVDictionary **options)=0;
|
|
virtual int av_write_trailer(AVFormatContext *s)=0;
|
|
virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt)=0;
|
|
virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags)=0;
|
|
@@ -167,7 +167,7 @@ public:
|
|
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
|
|
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
|
|
offset_t (*seek)(void *opaque, offset_t offset, int whence)) { return ::av_alloc_put_byte(buffer, buffer_size, write_flag, opaque, read_packet, write_packet, seek); }
|
|
- virtual int av_write_header (AVFormatContext *s) { return ::av_write_header (s); }
|
|
+ virtual int avformat_write_header (AVFormatContext *s, AVDictionary **options) { return ::avformat_write_header (s, options); }
|
|
virtual int av_write_trailer(AVFormatContext *s) { return ::av_write_trailer(s); }
|
|
virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt) { return ::av_write_frame(s, pkt); }
|
|
virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags) { return ::av_metadata_set2(pm, key, value, flags); }
|
|
@@ -230,7 +230,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface
|
|
int(*p5)(void *opaque, uint8_t *buf, int buf_size),
|
|
int(*p6)(void *opaque, uint8_t *buf, int buf_size),
|
|
offset_t(*p7)(void *opaque, offset_t offset, int whence)))
|
|
- DEFINE_METHOD1(int, av_write_header , (AVFormatContext *p1))
|
|
+ DEFINE_METHOD2(int, avformat_write_header , (AVFormatContext *p1, AVDictionary **p2))
|
|
DEFINE_METHOD1(int, av_write_trailer, (AVFormatContext *p1))
|
|
DEFINE_METHOD2(int, av_write_frame , (AVFormatContext *p1, AVPacket *p2))
|
|
DEFINE_METHOD4(int, av_metadata_set2, (AVDictionary **p1, const char *p2, const char *p3, int p4));
|
|
@@ -270,7 +270,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface
|
|
RESOLVE_METHOD(av_guess_format)
|
|
RESOLVE_METHOD(av_set_parameters)
|
|
RESOLVE_METHOD(av_alloc_put_byte)
|
|
- RESOLVE_METHOD(av_write_header)
|
|
+ RESOLVE_METHOD(avformat_write_header)
|
|
RESOLVE_METHOD(av_write_trailer)
|
|
RESOLVE_METHOD(av_write_frame)
|
|
RESOLVE_METHOD(av_metadata_set2)
|
|
diff --git a/xbmc/cdrip/EncoderFFmpeg.cpp b/xbmc/cdrip/EncoderFFmpeg.cpp
|
|
index 220fe21..13c9772 100644
|
|
--- a/xbmc/cdrip/EncoderFFmpeg.cpp
|
|
+++ b/xbmc/cdrip/EncoderFFmpeg.cpp
|
|
@@ -175,7 +175,7 @@ bool CEncoderFFmpeg::Init(const char* strFile, int iInChannels, int iInRate, int
|
|
SetTag("encoder" , "XBMC FFmpeg Encoder");
|
|
|
|
/* write the header */
|
|
- if (m_dllAvFormat.av_write_header(m_Format) != 0)
|
|
+ if (m_dllAvFormat.avformat_write_header(m_Format, NULL) != 0)
|
|
{
|
|
CLog::Log(LOGERROR, "CEncoderFFmpeg::Init - Failed to write the header");
|
|
delete[] m_Buffer;
|
|
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
|
|
index 9b71fd3..4257f96 100644
|
|
--- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
|
|
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
|
|
@@ -169,7 +169,7 @@ bool CDVDAudioCodecPassthroughFFmpeg::SetupMuxer(CDVDStreamInfo &hints, CStdStri
|
|
codec->extradata_size = hints.extrasize;
|
|
memcpy(codec->extradata, hints.extradata, hints.extrasize);
|
|
|
|
- muxer.m_WroteHeader = m_dllAvFormat.av_write_header(muxer.m_pFormat) == 0;
|
|
+ muxer.m_WroteHeader = m_dllAvFormat.avformat_write_header(muxer.m_pFormat, NULL) == 0;
|
|
if (!muxer.m_WroteHeader)
|
|
{
|
|
CLog::Log(LOGERROR, "CDVDAudioCodecPassthrough::SetupMuxer - Failed to write the frame header");
|