Replace av_write_header by avformat_write_header.
authorAlexis Ballier <aballier@gentoo.org>
Thu, 1 Mar 2012 13:33:19 +0000 (10:33 -0300)
committerelupus <elupus@xbmc.org>
Sat, 31 Mar 2012 14:28:36 +0000 (16:28 +0200)
The former is gone in libavformat 54.

lib/DllAvFormat.h
xbmc/cdrip/EncoderFFmpeg.cpp
xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp

index 3c7f9fa..df946ee 100644 (file)
@@ -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)
index 220fe21..13c9772 100644 (file)
@@ -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;
index 9b71fd3..4257f96 100644 (file)
@@ -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");