1 |
From 7f7ea745b79839e0a4ebb534e5e6da2ea1ae2a84 Mon Sep 17 00:00:00 2001 |
2 |
From: Alexis Ballier <aballier@gentoo.org> |
3 |
Date: Thu, 1 Mar 2012 10:33:19 -0300 |
4 |
Subject: [PATCH 121/145] Replace av_write_header by avformat_write_header. |
5 |
|
6 |
The former is gone in libavformat 54. |
7 |
(cherry picked from commit e4396ee8a6010c03dca976c8204c29d1da1ec299) |
8 |
--- |
9 |
lib/DllAvFormat.h | 8 ++++---- |
10 |
xbmc/cdrip/EncoderFFmpeg.cpp | 2 +- |
11 |
.../DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp | 2 +- |
12 |
3 files changed, 6 insertions(+), 6 deletions(-) |
13 |
|
14 |
diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h |
15 |
index 3c7f9fa..df946ee 100644 |
16 |
--- a/lib/DllAvFormat.h |
17 |
+++ b/lib/DllAvFormat.h |
18 |
@@ -103,7 +103,7 @@ public: |
19 |
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), |
20 |
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), |
21 |
offset_t (*seek)(void *opaque, offset_t offset, int whence))=0; |
22 |
- virtual int av_write_header (AVFormatContext *s)=0; |
23 |
+ virtual int avformat_write_header (AVFormatContext *s, AVDictionary **options)=0; |
24 |
virtual int av_write_trailer(AVFormatContext *s)=0; |
25 |
virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt)=0; |
26 |
virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags)=0; |
27 |
@@ -167,7 +167,7 @@ public: |
28 |
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), |
29 |
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), |
30 |
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); } |
31 |
- virtual int av_write_header (AVFormatContext *s) { return ::av_write_header (s); } |
32 |
+ virtual int avformat_write_header (AVFormatContext *s, AVDictionary **options) { return ::avformat_write_header (s, options); } |
33 |
virtual int av_write_trailer(AVFormatContext *s) { return ::av_write_trailer(s); } |
34 |
virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt) { return ::av_write_frame(s, pkt); } |
35 |
virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags) { return ::av_metadata_set2(pm, key, value, flags); } |
36 |
@@ -230,7 +230,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface |
37 |
int(*p5)(void *opaque, uint8_t *buf, int buf_size), |
38 |
int(*p6)(void *opaque, uint8_t *buf, int buf_size), |
39 |
offset_t(*p7)(void *opaque, offset_t offset, int whence))) |
40 |
- DEFINE_METHOD1(int, av_write_header , (AVFormatContext *p1)) |
41 |
+ DEFINE_METHOD2(int, avformat_write_header , (AVFormatContext *p1, AVDictionary **p2)) |
42 |
DEFINE_METHOD1(int, av_write_trailer, (AVFormatContext *p1)) |
43 |
DEFINE_METHOD2(int, av_write_frame , (AVFormatContext *p1, AVPacket *p2)) |
44 |
DEFINE_METHOD4(int, av_metadata_set2, (AVDictionary **p1, const char *p2, const char *p3, int p4)); |
45 |
@@ -270,7 +270,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface |
46 |
RESOLVE_METHOD(av_guess_format) |
47 |
RESOLVE_METHOD(av_set_parameters) |
48 |
RESOLVE_METHOD(av_alloc_put_byte) |
49 |
- RESOLVE_METHOD(av_write_header) |
50 |
+ RESOLVE_METHOD(avformat_write_header) |
51 |
RESOLVE_METHOD(av_write_trailer) |
52 |
RESOLVE_METHOD(av_write_frame) |
53 |
RESOLVE_METHOD(av_metadata_set2) |
54 |
diff --git a/xbmc/cdrip/EncoderFFmpeg.cpp b/xbmc/cdrip/EncoderFFmpeg.cpp |
55 |
index 220fe21..13c9772 100644 |
56 |
--- a/xbmc/cdrip/EncoderFFmpeg.cpp |
57 |
+++ b/xbmc/cdrip/EncoderFFmpeg.cpp |
58 |
@@ -175,7 +175,7 @@ bool CEncoderFFmpeg::Init(const char* strFile, int iInChannels, int iInRate, int |
59 |
SetTag("encoder" , "XBMC FFmpeg Encoder"); |
60 |
|
61 |
/* write the header */ |
62 |
- if (m_dllAvFormat.av_write_header(m_Format) != 0) |
63 |
+ if (m_dllAvFormat.avformat_write_header(m_Format, NULL) != 0) |
64 |
{ |
65 |
CLog::Log(LOGERROR, "CEncoderFFmpeg::Init - Failed to write the header"); |
66 |
delete[] m_Buffer; |
67 |
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp |
68 |
index 9b71fd3..4257f96 100644 |
69 |
--- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp |
70 |
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp |
71 |
@@ -169,7 +169,7 @@ bool CDVDAudioCodecPassthroughFFmpeg::SetupMuxer(CDVDStreamInfo &hints, CStdStri |
72 |
codec->extradata_size = hints.extrasize; |
73 |
memcpy(codec->extradata, hints.extradata, hints.extrasize); |
74 |
|
75 |
- muxer.m_WroteHeader = m_dllAvFormat.av_write_header(muxer.m_pFormat) == 0; |
76 |
+ muxer.m_WroteHeader = m_dllAvFormat.avformat_write_header(muxer.m_pFormat, NULL) == 0; |
77 |
if (!muxer.m_WroteHeader) |
78 |
{ |
79 |
CLog::Log(LOGERROR, "CDVDAudioCodecPassthrough::SetupMuxer - Failed to write the frame header"); |
80 |
-- |
81 |
1.7.10 |
82 |
|