/[packages]/cauldron/xbmc/current/SOURCES/0106-Drop-now-merged-or-redundant-patches.patch
ViewVC logotype

Contents of /cauldron/xbmc/current/SOURCES/0106-Drop-now-merged-or-redundant-patches.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 269300 - (show annotations) (download)
Tue Jul 10 19:13:54 2012 UTC (11 years, 9 months ago) by anssi
File size: 117695 byte(s)
- fix missing include in wiiremote eventclient
  (wiiremote-missing-include.patch)
- backport FFmpeg support patches to allow build with cauldron ffmpeg
  (patches 101..145)

1 From 902ac4ddd9b28810d70aa2d148825565fde0d474 Mon Sep 17 00:00:00 2001
2 From: elupus <elupus@xbmc.org>
3 Date: Tue, 27 Mar 2012 22:40:55 +0200
4 Subject: [PATCH 106/145] Drop now merged or redundant patches (cherry picked
5 from commit
6 32ab5065e68b97c9e1e45974b1868daf41dfaea4)
7
8 ---
9 ...ow-reading-of-growing-avi-files-ie-curren.patch | 52 --------
10 .../patches/0002-w32thread-add-logging.patch | 46 -------
11 .../0004-support-seeking-in-nuv-files.patch | 126 -------------------
12 ...Media-file-gets-played-twice.-we-assume-a.patch | 35 ------
13 ...additional-HDMV-types-and-reg-descriptors.patch | 36 ------
14 ...ck-some-more-url_fseeks-in-asf-demuxer-to.patch | 39 ------
15 ...ds-DTS-detection-to-MOV-files-ffmpeg-issu.patch | 24 ----
16 ...ck-for-seek-error-when-attempting-to-read.patch | 27 ----
17 ...wrong-fps-for-rmvb-files-patch-by-taxigps.patch | 38 ------
18 ...0022-don-t-hardcode-subtitle-colors-to-16.patch | 25 ----
19 ...ck-return-value-of-seeks-to-avoid-messing.patch | 62 ---------
20 ...vc-s-mpeg2-decoder-was-asked-to-drop-a-fr.patch | 26 ----
21 ...ntainer-doesn-t-contain-timestamps-for-al.patch | 29 -----
22 ...ecoder-should-set-key_frame-field-of-AVFr.patch | 25 ----
23 ...-build-with-enable-runtime-cpudetect-disa.patch | 56 ---------
24 ...-t-store-RTSPStream-in-AVStream-priv_data.patch | 108 ----------------
25 ...fenc-fix-byte-order-on-big-endian-systems.patch | 121 ------------------
26 ..._STREAMS-hack-back-it-was-lost-after-the-.patch | 28 -----
27 ...pdate-ff_probe_input_buffer-documentation.patch | 29 -----
28 ...ify-pb-parameter-of-ff_probe_input_buffer.patch | 71 -----------
29 ...e-ff_probe_input_buffer-to-make-it-public.patch | 100 ---------------
30 ...scover-streams-in-extended-stream-propert.patch | 56 ---------
31 .../0046-os_support-fix-poll-implementation.patch | 29 -----
32 ...-ffmpeg-feature-to-parse-flv-fileposition.patch | 105 ----------------
33 ...nt-mark-genereted-dummy-frame-as-keyframe.patch | 31 -----
34 ...ty-to-enable-workaround-for-dxva2-decodin.patch | 70 -----------
35 ...for-memory-leaks-in-DVB-subtitles-decoder.patch | 25 ----
36 lib/ffmpeg/patches/0058-fixed-seeks-in-mmsh.patch | 124 ------------------
37 lib/ffmpeg/patches/0059-fix-h264-decode-size.patch | 43 -------
38 .../0061-fix-vc1-vaapi-intel-sandy-bridge.patch | 48 -------
39 ...-in-ffmpeg-matroskadec-with-some-files-fi.patch | 50 --------
40 ...ow-yadif-deinterlacer-to-enable-and-disab.patch | 106 ----------------
41 ...ated-yadif-patch-to-same-as-will-be-appli.patch | 82 ------------
42 ...ated-dxva-zigzag-workaround-for-ATI-based.patch | 92 --------------
43 ...-should-copy-frame-properties-of-second-f.patch | 31 -----
44 ...-use-correct-compression-parameters-for-c.patch | 33 -----
45 lib/ffmpeg/patches/0071-fixed-Typo.patch | 25 ----
46 ...smatching-frame-numbers-in-fields-to-sync.patch | 33 -----
47 ...in-frame-gaps-with-copied-refs-after-flus.patch | 36 ------
48 ...t-assert-on-value-read-from-input-bitstre.patch | 41 ------
49 ...ack-from-mmst-urls-would-halt-after-some-.patch | 30 -----
50 ...f-to-not-use-out-of-picture-lines.-Fixes-.patch | 133 --------------------
51 ...78-fixed-ffmpeg-build-with-gcc-4.7-on-x86.patch | 68 ----------
52 43 files changed, 2394 deletions(-)
53 delete mode 100644 lib/ffmpeg/patches/0001-changed-allow-reading-of-growing-avi-files-ie-curren.patch
54 delete mode 100644 lib/ffmpeg/patches/0002-w32thread-add-logging.patch
55 delete mode 100644 lib/ffmpeg/patches/0004-support-seeking-in-nuv-files.patch
56 delete mode 100644 lib/ffmpeg/patches/0005-fixed-5585-Media-file-gets-played-twice.-we-assume-a.patch
57 delete mode 100644 lib/ffmpeg/patches/0009-additional-HDMV-types-and-reg-descriptors.patch
58 delete mode 100644 lib/ffmpeg/patches/0014-changed-check-some-more-url_fseeks-in-asf-demuxer-to.patch
59 delete mode 100644 lib/ffmpeg/patches/0015-Fix-7956-Adds-DTS-detection-to-MOV-files-ffmpeg-issu.patch
60 delete mode 100644 lib/ffmpeg/patches/0019-changed-check-for-seek-error-when-attempting-to-read.patch
61 delete mode 100644 lib/ffmpeg/patches/0020-fixed-wrong-fps-for-rmvb-files-patch-by-taxigps.patch
62 delete mode 100644 lib/ffmpeg/patches/0022-don-t-hardcode-subtitle-colors-to-16.patch
63 delete mode 100644 lib/ffmpeg/patches/0027-changed-check-return-value-of-seeks-to-avoid-messing.patch
64 delete mode 100644 lib/ffmpeg/patches/0028-fixed-if-lavc-s-mpeg2-decoder-was-asked-to-drop-a-fr.patch
65 delete mode 100644 lib/ffmpeg/patches/0029-fixed-if-container-doesn-t-contain-timestamps-for-al.patch
66 delete mode 100644 lib/ffmpeg/patches/0031-fixed-vp3-decoder-should-set-key_frame-field-of-AVFr.patch
67 delete mode 100644 lib/ffmpeg/patches/0036-swscale-fix-build-with-enable-runtime-cpudetect-disa.patch
68 delete mode 100644 lib/ffmpeg/patches/0038-rtsp-Don-t-store-RTSPStream-in-AVStream-priv_data.patch
69 delete mode 100644 lib/ffmpeg/patches/0039-spdifenc-fix-byte-order-on-big-endian-systems.patch
70 delete mode 100644 lib/ffmpeg/patches/0040-Add-our-MAX_STREAMS-hack-back-it-was-lost-after-the-.patch
71 delete mode 100644 lib/ffmpeg/patches/0041-lavf-update-ff_probe_input_buffer-documentation.patch
72 delete mode 100644 lib/ffmpeg/patches/0042-lavf-simplify-pb-parameter-of-ff_probe_input_buffer.patch
73 delete mode 100644 lib/ffmpeg/patches/0043-lavf-rename-ff_probe_input_buffer-to-make-it-public.patch
74 delete mode 100644 lib/ffmpeg/patches/0044-MMS-also-discover-streams-in-extended-stream-propert.patch
75 delete mode 100644 lib/ffmpeg/patches/0046-os_support-fix-poll-implementation.patch
76 delete mode 100644 lib/ffmpeg/patches/0047-Backporting-ffmpeg-feature-to-parse-flv-fileposition.patch
77 delete mode 100644 lib/ffmpeg/patches/0048-Dont-mark-genereted-dummy-frame-as-keyframe.patch
78 delete mode 100644 lib/ffmpeg/patches/0049-Added-ability-to-enable-workaround-for-dxva2-decodin.patch
79 delete mode 100644 lib/ffmpeg/patches/0050-Patch-for-memory-leaks-in-DVB-subtitles-decoder.patch
80 delete mode 100644 lib/ffmpeg/patches/0058-fixed-seeks-in-mmsh.patch
81 delete mode 100644 lib/ffmpeg/patches/0059-fix-h264-decode-size.patch
82 delete mode 100644 lib/ffmpeg/patches/0061-fix-vc1-vaapi-intel-sandy-bridge.patch
83 delete mode 100644 lib/ffmpeg/patches/0062-fixed-crash-in-ffmpeg-matroskadec-with-some-files-fi.patch
84 delete mode 100644 lib/ffmpeg/patches/0065-changed-allow-yadif-deinterlacer-to-enable-and-disab.patch
85 delete mode 100644 lib/ffmpeg/patches/0066-changed-updated-yadif-patch-to-same-as-will-be-appli.patch
86 delete mode 100644 lib/ffmpeg/patches/0067-changed-updated-dxva-zigzag-workaround-for-ATI-based.patch
87 delete mode 100644 lib/ffmpeg/patches/0068-fixed-yadif-should-copy-frame-properties-of-second-f.patch
88 delete mode 100644 lib/ffmpeg/patches/0070-matroskadec-use-correct-compression-parameters-for-c.patch
89 delete mode 100644 lib/ffmpeg/patches/0071-fixed-Typo.patch
90 delete mode 100644 lib/ffmpeg/patches/0072-h264-Use-mismatching-frame-numbers-in-fields-to-sync.patch
91 delete mode 100644 lib/ffmpeg/patches/0073-Don-t-fill-in-frame-gaps-with-copied-refs-after-flus.patch
92 delete mode 100644 lib/ffmpeg/patches/0074-vaapi-do-not-assert-on-value-read-from-input-bitstre.patch
93 delete mode 100644 lib/ffmpeg/patches/0075-fixed-playback-from-mmst-urls-would-halt-after-some-.patch
94 delete mode 100644 lib/ffmpeg/patches/0077-Change-yadif-to-not-use-out-of-picture-lines.-Fixes-.patch
95 delete mode 100644 lib/ffmpeg/patches/0078-fixed-ffmpeg-build-with-gcc-4.7-on-x86.patch
96
97 diff --git a/lib/ffmpeg/patches/0001-changed-allow-reading-of-growing-avi-files-ie-curren.patch b/lib/ffmpeg/patches/0001-changed-allow-reading-of-growing-avi-files-ie-curren.patch
98 deleted file mode 100644
99 index 72af980..0000000
100 --- a/lib/ffmpeg/patches/0001-changed-allow-reading-of-growing-avi-files-ie-curren.patch
101 +++ /dev/null
102 @@ -1,52 +0,0 @@
103 -From 4cb1a5a9e6a7258a5c4026c57f3e2bae9df292d0 Mon Sep 17 00:00:00 2001
104 -From: Cory Fields <theuni-nospam-@xbmc.org>
105 -Date: Mon, 28 Jun 2010 01:28:27 -0400
106 -Subject: [PATCH 01/36] changed: allow reading of growing avi files (ie currently being written)
107 -
108 ----
109 - libavformat/avidec.c | 8 ++++----
110 - 1 files changed, 4 insertions(+), 4 deletions(-)
111 -
112 -diff --git a/libavformat/avidec.c b/libavformat/avidec.c
113 -index d8d4726..6b3e927 100644
114 ---- a/libavformat/avidec.c
115 -+++ b/libavformat/avidec.c
116 -@@ -139,7 +139,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){
117 - AVIStream *ast;
118 - int i;
119 - int64_t last_pos= -1;
120 -- int64_t filesize= url_fsize(s->pb);
121 -+ int64_t filesize= avi->fsize;
122 -
123 - #ifdef DEBUG_SEEK
124 - av_log(s, AV_LOG_ERROR, "longs_pre_entry:%d index_type:%d entries_in_use:%d chunk_id:%X base:%16"PRIX64"\n",
125 -@@ -353,7 +353,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
126 - return -1;
127 -
128 - avi->fsize = url_fsize(pb);
129 -- if(avi->fsize<=0)
130 -+ if(avi->fsize<=0 || avi->fsize < avi->riff_end)
131 - avi->fsize= avi->riff_end == 8 ? INT64_MAX : avi->riff_end;
132 -
133 - /* first list tag */
134 -@@ -379,7 +379,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
135 - if (tag1 == MKTAG('m', 'o', 'v', 'i')) {
136 - avi->movi_list = url_ftell(pb) - 4;
137 - if(size) avi->movi_end = avi->movi_list + size + (size & 1);
138 -- else avi->movi_end = url_fsize(pb);
139 -+ else avi->movi_end = avi->fsize;
140 - av_dlog(NULL, "movi end=%"PRIx64"\n", avi->movi_end);
141 - goto end_of_header;
142 - }
143 -@@ -706,7 +706,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
144 - av_log(s, AV_LOG_ERROR, "Something went wrong during header parsing, "
145 - "I will ignore it and try to continue anyway.\n");
146 - avi->movi_list = url_ftell(pb) - 4;
147 -- avi->movi_end = url_fsize(pb);
148 -+ avi->movi_end = avi->fsize;
149 - goto end_of_header;
150 - }
151 - /* skip tag */
152 ---
153 -1.7.3
154 -
155 diff --git a/lib/ffmpeg/patches/0002-w32thread-add-logging.patch b/lib/ffmpeg/patches/0002-w32thread-add-logging.patch
156 deleted file mode 100644
157 index 1767f87..0000000
158 --- a/lib/ffmpeg/patches/0002-w32thread-add-logging.patch
159 +++ /dev/null
160 @@ -1,46 +0,0 @@
161 -From c564d6ba80e9c27c0fa95835cf09efd08fc6d570 Mon Sep 17 00:00:00 2001
162 -From: Cory Fields <theuni-nospam-@xbmc.org>
163 -Date: Mon, 28 Jun 2010 01:30:34 -0400
164 -Subject: [PATCH 02/36] w32thread: add logging
165 -
166 ----
167 - libavcodec/w32thread.c | 6 ++++--
168 - 1 files changed, 4 insertions(+), 2 deletions(-)
169 -
170 -diff --git a/libavcodec/w32thread.c b/libavcodec/w32thread.c
171 -index f7a1430..5654334 100644
172 ---- a/libavcodec/w32thread.c
173 -+++ b/libavcodec/w32thread.c
174 -@@ -130,7 +130,7 @@ int avcodec_thread_init(AVCodecContext *s, int thread_count){
175 - uint32_t threadid;
176 -
177 - s->thread_count= thread_count;
178 --
179 -+av_log(NULL, AV_LOG_INFO, "[w32thread] thread count = %d\n", thread_count);
180 - if (thread_count <= 1)
181 - return 0;
182 -
183 -@@ -147,17 +147,19 @@ int avcodec_thread_init(AVCodecContext *s, int thread_count){
184 - for(i=0; i<thread_count; i++){
185 - //printf("init semaphors %d\n", i); fflush(stdout);
186 - c[i].avctx= s;
187 -+av_log(NULL, AV_LOG_INFO, "[w32thread] init semaphors %d\n", i+1);
188 - c[i].work_sem = c[0].work_sem;
189 - c[i].job_sem = c[0].job_sem;
190 - c[i].done_sem = c[0].done_sem;
191 - c[i].threadnr = i;
192 -
193 - //printf("create thread %d\n", i); fflush(stdout);
194 -+av_log(NULL, AV_LOG_INFO, "[w32thread] create thread %d\n", i+1);
195 - c[i].thread = (HANDLE)_beginthreadex(NULL, 0, thread_func, &c[i], 0, &threadid );
196 - if( !c[i].thread ) goto fail;
197 - }
198 - //printf("init done\n"); fflush(stdout);
199 --
200 -+av_log(NULL, AV_LOG_INFO, "[w32thread] init done\n");
201 - s->execute= avcodec_thread_execute;
202 - s->execute2= avcodec_thread_execute2;
203 -
204 ---
205 -1.7.3
206 -
207 diff --git a/lib/ffmpeg/patches/0004-support-seeking-in-nuv-files.patch b/lib/ffmpeg/patches/0004-support-seeking-in-nuv-files.patch
208 deleted file mode 100644
209 index 593427f..0000000
210 --- a/lib/ffmpeg/patches/0004-support-seeking-in-nuv-files.patch
211 +++ /dev/null
212 @@ -1,126 +0,0 @@
213 -From 2433fbdc04fd5497f71b1e3d5f9a184048616734 Mon Sep 17 00:00:00 2001
214 -From: Cory Fields <theuni-nospam-@xbmc.org>
215 -Date: Mon, 28 Jun 2010 01:36:50 -0400
216 -Subject: [PATCH 04/36] support seeking in nuv files
217 -
218 ----
219 - libavformat/nuv.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++
220 - 1 files changed, 84 insertions(+), 0 deletions(-)
221 -
222 -diff --git a/libavformat/nuv.c b/libavformat/nuv.c
223 -index 58a00df..04b256c 100644
224 ---- a/libavformat/nuv.c
225 -+++ b/libavformat/nuv.c
226 -@@ -218,12 +218,18 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
227 - ret = av_new_packet(pkt, copyhdrsize + size);
228 - if (ret < 0)
229 - return ret;
230 -+
231 - // HACK: we have no idea if it is a keyframe,
232 - // but if we mark none seeking will not work at all.
233 - pkt->flags |= AV_PKT_FLAG_KEY;
234 - pkt->pos = pos;
235 - pkt->pts = AV_RL32(&hdr[4]);
236 - pkt->stream_index = ctx->v_id;
237 -+ if(hdr[2] == 0) {
238 -+ AVStream *st = s->streams[pkt->stream_index];
239 -+ pkt->flags |= PKT_FLAG_KEY;
240 -+ av_add_index_entry(st, pkt->pos, pkt->pts, size + HDRSIZE, 0, AVINDEX_KEYFRAME);
241 -+ }
242 - memcpy(pkt->data, hdr, copyhdrsize);
243 - ret = get_buffer(pb, pkt->data + copyhdrsize, size);
244 - if (ret < 0) {
245 -@@ -257,6 +263,83 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
246 - return AVERROR(EIO);
247 - }
248 -
249 -+/**
250 -+ * \brief looks for the string RTjjjjjjjjjj in the stream too resync reading
251 -+ * \return TRUE if the syncword is found.
252 -+ */
253 -+static int nuv_resync(AVFormatContext *s, int64_t pos_limit) {
254 -+ ByteIOContext *pb = s->pb;
255 -+ uint32_t tag;
256 -+
257 -+ tag = get_be32(pb);
258 -+ while(!url_feof(pb) && url_ftell(pb) < pos_limit) {
259 -+ if(tag != MKBETAG('R','T','j','j')) {
260 -+ tag = (tag << 8) | get_byte(pb);
261 -+ continue;
262 -+ }
263 -+ tag = get_be32(pb);
264 -+ if(tag != MKBETAG('j','j','j','j'))
265 -+ continue;
266 -+
267 -+ tag = get_be32(pb);
268 -+ if(tag != MKBETAG('j','j','j','j'))
269 -+ continue;
270 -+
271 -+ return 1;
272 -+ }
273 -+ return 0;
274 -+}
275 -+
276 -+/**
277 -+ * \brief attempts to read a timestamp from stream at the given stream position
278 -+ * \return timestamp if successfull and AV_NOPTS_VALUE if failure
279 -+ */
280 -+static int64_t nuv_read_dts(AVFormatContext *s, int stream_index,
281 -+ int64_t *ppos, int64_t pos_limit)
282 -+{
283 -+ NUVContext *ctx = s->priv_data;
284 -+ ByteIOContext *pb = s->pb;
285 -+ uint8_t hdr[HDRSIZE];
286 -+ nuv_frametype frametype;
287 -+ int size;
288 -+ int64_t pos, dts;
289 -+
290 -+ if (url_fseek(pb, *ppos, SEEK_SET) < 0)
291 -+ return AV_NOPTS_VALUE;
292 -+
293 -+ if (!nuv_resync(s, pos_limit))
294 -+ return AV_NOPTS_VALUE;
295 -+
296 -+ while (!url_feof(pb) && url_ftell(pb) < pos_limit) {
297 -+ if (get_buffer(pb, hdr, HDRSIZE) <= 0)
298 -+ return AV_NOPTS_VALUE;
299 -+ frametype = hdr[0];
300 -+ size = PKTSIZE(AV_RL32(&hdr[8]));
301 -+ switch (frametype) {
302 -+ case NUV_SEEKP:
303 -+ break;
304 -+ case NUV_AUDIO:
305 -+ case NUV_VIDEO:
306 -+ pos = url_ftell(s->pb) - HDRSIZE;
307 -+ dts = AV_RL32(&hdr[4]);
308 -+ // TODO - add general support in av_gen_search, so it adds positions after reading timestamps
309 -+ av_add_index_entry(s->streams[frametype == NUV_VIDEO ? ctx->v_id : ctx->a_id]
310 -+ , pos, dts, size + HDRSIZE, 0, hdr[2] == 0 ? AVINDEX_KEYFRAME : 0);
311 -+
312 -+ if ((frametype == NUV_VIDEO && stream_index == ctx->v_id) ||
313 -+ (frametype == NUV_AUDIO && stream_index == ctx->a_id)) {
314 -+ *ppos = pos;
315 -+ return dts;
316 -+ }
317 -+ default:
318 -+ url_fskip(pb, size);
319 -+ break;
320 -+ }
321 -+ }
322 -+ return AV_NOPTS_VALUE;
323 -+}
324 -+
325 -+
326 - AVInputFormat ff_nuv_demuxer = {
327 - "nuv",
328 - NULL_IF_CONFIG_SMALL("NuppelVideo format"),
329 -@@ -266,5 +349,6 @@ AVInputFormat ff_nuv_demuxer = {
330 - nuv_packet,
331 - NULL,
332 - NULL,
333 -+ nuv_read_dts,
334 - .flags = AVFMT_GENERIC_INDEX,
335 - };
336 ---
337 -1.7.3
338 -
339 diff --git a/lib/ffmpeg/patches/0005-fixed-5585-Media-file-gets-played-twice.-we-assume-a.patch b/lib/ffmpeg/patches/0005-fixed-5585-Media-file-gets-played-twice.-we-assume-a.patch
340 deleted file mode 100644
341 index 29f2d9c..0000000
342 --- a/lib/ffmpeg/patches/0005-fixed-5585-Media-file-gets-played-twice.-we-assume-a.patch
343 +++ /dev/null
344 @@ -1,35 +0,0 @@
345 -From 0c18eecd120fac527942cd8609545bfba7566b27 Mon Sep 17 00:00:00 2001
346 -From: Cory Fields <theuni-nospam-@xbmc.org>
347 -Date: Mon, 28 Jun 2010 01:45:48 -0400
348 -Subject: [PATCH 05/36] fixed: #5585 Media file gets played twice. we assume avi EOF when we can't find the next streams index entry for non interleaved files.
349 -
350 ----
351 - libavformat/avidec.c | 5 ++++-
352 - 1 files changed, 4 insertions(+), 1 deletions(-)
353 -
354 -diff --git a/libavformat/avidec.c b/libavformat/avidec.c
355 -index 6b3e927..3d223b7 100644
356 ---- a/libavformat/avidec.c
357 -+++ b/libavformat/avidec.c
358 -@@ -898,7 +898,8 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
359 - if(i>=0){
360 - int64_t pos= best_st->index_entries[i].pos;
361 - pos += best_ast->packet_size - best_ast->remaining;
362 -- url_fseek(s->pb, pos + 8, SEEK_SET);
363 -+ if(url_fseek(s->pb, pos + 8, SEEK_SET) < 0)
364 -+ return AVERROR_EOF;
365 - // av_log(s, AV_LOG_DEBUG, "pos=%"PRId64"\n", pos);
366 -
367 - assert(best_ast->remaining <= best_ast->packet_size);
368 -@@ -908,6 +909,8 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
369 - best_ast->packet_size=
370 - best_ast->remaining= best_st->index_entries[i].size;
371 - }
372 -+ else
373 -+ return AVERROR_EOF;
374 - }
375 -
376 - resync:
377 ---
378 -1.7.3
379 -
380 diff --git a/lib/ffmpeg/patches/0009-additional-HDMV-types-and-reg-descriptors.patch b/lib/ffmpeg/patches/0009-additional-HDMV-types-and-reg-descriptors.patch
381 deleted file mode 100644
382 index cfa85ca..0000000
383 --- a/lib/ffmpeg/patches/0009-additional-HDMV-types-and-reg-descriptors.patch
384 +++ /dev/null
385 @@ -1,36 +0,0 @@
386 -From 576a80321fbb6a6f4c4e69af75440e94990498bc Mon Sep 17 00:00:00 2001
387 -From: Cory Fields <theuni-nospam-@xbmc.org>
388 -Date: Mon, 28 Jun 2010 02:15:41 -0400
389 -Subject: [PATCH 09/36] additional HDMV types and reg descriptors
390 -
391 ----
392 - libavformat/mpegts.c | 6 ++++++
393 - 1 files changed, 6 insertions(+), 0 deletions(-)
394 -
395 -diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
396 -index d550e3e..74b0886 100644
397 ---- a/libavformat/mpegts.c
398 -+++ b/libavformat/mpegts.c
399 -@@ -512,6 +512,8 @@ static const StreamType HDMV_types[] = {
400 - { 0x82, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
401 - { 0x83, AVMEDIA_TYPE_AUDIO, CODEC_ID_TRUEHD },
402 - { 0x84, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 },
403 -+ { 0x85, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, /* DTS HD */
404 -+ { 0x86, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, /* DTS HD MASTER*/
405 - { 0x90, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE },
406 - { 0 },
407 - };
408 -@@ -526,6 +528,10 @@ static const StreamType MISC_types[] = {
409 - static const StreamType REGD_types[] = {
410 - { MKTAG('d','r','a','c'), AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },
411 - { MKTAG('A','C','-','3'), AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },
412 -+ { MKTAG('D','T','S','1'), AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
413 -+ { MKTAG('D','T','S','2'), AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
414 -+ { MKTAG('D','T','S','3'), AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
415 -+ { MKTAG('V','C','-','1'), AVMEDIA_TYPE_VIDEO, CODEC_ID_VC1 },
416 - { 0 },
417 - };
418 -
419 ---
420 -1.7.3
421 -
422 diff --git a/lib/ffmpeg/patches/0014-changed-check-some-more-url_fseeks-in-asf-demuxer-to.patch b/lib/ffmpeg/patches/0014-changed-check-some-more-url_fseeks-in-asf-demuxer-to.patch
423 deleted file mode 100644
424 index c196041..0000000
425 --- a/lib/ffmpeg/patches/0014-changed-check-some-more-url_fseeks-in-asf-demuxer-to.patch
426 +++ /dev/null
427 @@ -1,39 +0,0 @@
428 -From 9f19ad85257c413cf6c1facb6dc49efa8a10b6b3 Mon Sep 17 00:00:00 2001
429 -From: Cory Fields <theuni-nospam-@xbmc.org>
430 -Date: Mon, 28 Jun 2010 22:27:09 -0400
431 -Subject: [PATCH 14/36] changed: check some more url_fseeks in asf demuxer to avoid problems if file system is unseekable
432 -
433 ----
434 - libavformat/asfdec.c | 9 +++++++--
435 - 1 files changed, 7 insertions(+), 2 deletions(-)
436 -
437 -diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
438 -index 2bda885..4347601 100644
439 ---- a/libavformat/asfdec.c
440 -+++ b/libavformat/asfdec.c
441 -@@ -1058,7 +1058,8 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, int64_t *ppos,
442 - if (s->packet_size > 0)
443 - pos= (pos+s->packet_size-1-s->data_offset)/s->packet_size*s->packet_size+ s->data_offset;
444 - *ppos= pos;
445 -- url_fseek(s->pb, pos, SEEK_SET);
446 -+ if (url_fseek(s->pb, pos, SEEK_SET) < 0)
447 -+ return AV_NOPTS_VALUE;
448 -
449 - //printf("asf_read_pts\n");
450 - asf_reset_header(s);
451 -@@ -1100,7 +1101,11 @@ static void asf_build_simple_index(AVFormatContext *s, int stream_index)
452 - int64_t current_pos= url_ftell(s->pb);
453 - int i;
454 -
455 -- url_fseek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET);
456 -+ if(url_fseek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET) < 0) {
457 -+ asf->index_read= -1;
458 -+ return;
459 -+ }
460 -+
461 - ff_get_guid(s->pb, &g);
462 -
463 - /* the data object can be followed by other top-level objects,
464 ---
465 -1.7.3
466 -
467 diff --git a/lib/ffmpeg/patches/0015-Fix-7956-Adds-DTS-detection-to-MOV-files-ffmpeg-issu.patch b/lib/ffmpeg/patches/0015-Fix-7956-Adds-DTS-detection-to-MOV-files-ffmpeg-issu.patch
468 deleted file mode 100644
469 index 113d42a..0000000
470 --- a/lib/ffmpeg/patches/0015-Fix-7956-Adds-DTS-detection-to-MOV-files-ffmpeg-issu.patch
471 +++ /dev/null
472 @@ -1,24 +0,0 @@
473 -From ead553179b4b145c4fd10af1bc9f827877bc559f Mon Sep 17 00:00:00 2001
474 -From: Cory Fields <theuni-nospam-@xbmc.org>
475 -Date: Mon, 28 Jun 2010 22:33:07 -0400
476 -Subject: [PATCH 15/36] Fix #7956 - Adds DTS detection to MOV files (ffmpeg issue 1726)
477 -
478 ----
479 - libavformat/isom.c | 1 +
480 - 1 files changed, 1 insertions(+), 0 deletions(-)
481 -
482 -diff --git a/libavformat/isom.c b/libavformat/isom.c
483 -index 23ef82a..013cca7 100644
484 ---- a/libavformat/isom.c
485 -+++ b/libavformat/isom.c
486 -@@ -230,6 +230,7 @@ const AVCodecTag codec_movaudio_tags[] = {
487 - { CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') }, /* MPEG-4 AAC */
488 - { CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */
489 - { CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */
490 -+ { CODEC_ID_DTS, MKTAG('D', 'T', 'S', ' ') }, /* DTS */
491 -
492 - { CODEC_ID_AMR_NB, MKTAG('s', 'a', 'm', 'r') }, /* AMR-NB 3gp */
493 - { CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */
494 ---
495 -1.7.3
496 -
497 diff --git a/lib/ffmpeg/patches/0019-changed-check-for-seek-error-when-attempting-to-read.patch b/lib/ffmpeg/patches/0019-changed-check-for-seek-error-when-attempting-to-read.patch
498 deleted file mode 100644
499 index 2dcc85c..0000000
500 --- a/lib/ffmpeg/patches/0019-changed-check-for-seek-error-when-attempting-to-read.patch
501 +++ /dev/null
502 @@ -1,27 +0,0 @@
503 -From d4a0766af6b82ab3c99a56c726ec66cada0da6de Mon Sep 17 00:00:00 2001
504 -From: Cory Fields <theuni-nospam-@xbmc.org>
505 -Date: Fri, 9 Jul 2010 15:21:10 -0400
506 -Subject: [PATCH 19/36] changed: check for seek error when attempting to read timestamp in rm demuxer
507 -
508 ----
509 - libavformat/rmdec.c | 4 +++-
510 - 1 files changed, 3 insertions(+), 1 deletions(-)
511 -
512 -diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
513 -index da7e6b2..94bfc43 100644
514 ---- a/libavformat/rmdec.c
515 -+++ b/libavformat/rmdec.c
516 -@@ -904,7 +904,9 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
517 - if(rm->old_format)
518 - return AV_NOPTS_VALUE;
519 -
520 -- url_fseek(s->pb, pos, SEEK_SET);
521 -+ if (url_fseek(s->pb, pos, SEEK_SET) < 0)
522 -+ return AV_NOPTS_VALUE;
523 -+
524 - rm->remaining_len=0;
525 - for(;;){
526 - int seq=1;
527 ---
528 -1.7.3
529 -
530 diff --git a/lib/ffmpeg/patches/0020-fixed-wrong-fps-for-rmvb-files-patch-by-taxigps.patch b/lib/ffmpeg/patches/0020-fixed-wrong-fps-for-rmvb-files-patch-by-taxigps.patch
531 deleted file mode 100644
532 index cde7f7a..0000000
533 --- a/lib/ffmpeg/patches/0020-fixed-wrong-fps-for-rmvb-files-patch-by-taxigps.patch
534 +++ /dev/null
535 @@ -1,38 +0,0 @@
536 -From a10bd5edd13e8aff5e81bd1c8dddebde1698ed36 Mon Sep 17 00:00:00 2001
537 -From: Cory Fields <theuni-nospam-@xbmc.org>
538 -Date: Fri, 9 Jul 2010 15:22:09 -0400
539 -Subject: [PATCH 20/36] fixed: wrong fps for rmvb files (patch by taxigps)
540 -
541 ----
542 - libavformat/rmdec.c | 7 +++----
543 - 1 files changed, 3 insertions(+), 4 deletions(-)
544 -
545 -diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
546 -index 94bfc43..8b59b1d 100644
547 ---- a/libavformat/rmdec.c
548 -+++ b/libavformat/rmdec.c
549 -@@ -294,18 +294,17 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, ByteIOContext *pb,
550 - goto fail1;
551 - st->codec->width = get_be16(pb);
552 - st->codec->height = get_be16(pb);
553 -- st->codec->time_base.num= 1;
554 -+ st->codec->time_base.num= 1 << 16;
555 - fps= get_be16(pb);
556 - st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
557 - get_be32(pb);
558 -- fps2= get_be16(pb);
559 -- get_be16(pb);
560 -+ fps2= get_be32(pb);
561 -
562 - if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (url_ftell(pb) - codec_pos))) < 0)
563 - return ret;
564 -
565 - // av_log(s, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2);
566 -- st->codec->time_base.den = fps * st->codec->time_base.num;
567 -+ st->codec->time_base.den = fps2;
568 - //XXX: do we really need that?
569 - switch(st->codec->extradata[4]>>4){
570 - case 1: st->codec->codec_id = CODEC_ID_RV10; break;
571 ---
572 -1.7.3
573 -
574 diff --git a/lib/ffmpeg/patches/0022-don-t-hardcode-subtitle-colors-to-16.patch b/lib/ffmpeg/patches/0022-don-t-hardcode-subtitle-colors-to-16.patch
575 deleted file mode 100644
576 index bd5755b..0000000
577 --- a/lib/ffmpeg/patches/0022-don-t-hardcode-subtitle-colors-to-16.patch
578 +++ /dev/null
579 @@ -1,25 +0,0 @@
580 -From 31ec1522bb763dac0e77788a989ac3690de5a7ca Mon Sep 17 00:00:00 2001
581 -From: Cory Fields <theuni-nospam-@xbmc.org>
582 -Date: Fri, 9 Jul 2010 16:15:55 -0400
583 -Subject: [PATCH 22/36] don't hardcode subtitle colors to 16
584 -
585 ----
586 - libavcodec/dvbsubdec.c | 2 +-
587 - 1 files changed, 1 insertions(+), 1 deletions(-)
588 -
589 -diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
590 -index 0f1e004..e68a0b3 100644
591 ---- a/libavcodec/dvbsubdec.c
592 -+++ b/libavcodec/dvbsubdec.c
593 -@@ -1357,7 +1357,7 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
594 - rect->y = display->y_pos + offset_y;
595 - rect->w = region->width;
596 - rect->h = region->height;
597 -- rect->nb_colors = 16;
598 -+ rect->nb_colors = (1 << region->depth);
599 - rect->type = SUBTITLE_BITMAP;
600 - rect->pict.linesize[0] = region->width;
601 -
602 ---
603 -1.7.3
604 -
605 diff --git a/lib/ffmpeg/patches/0027-changed-check-return-value-of-seeks-to-avoid-messing.patch b/lib/ffmpeg/patches/0027-changed-check-return-value-of-seeks-to-avoid-messing.patch
606 deleted file mode 100644
607 index f62cd67..0000000
608 --- a/lib/ffmpeg/patches/0027-changed-check-return-value-of-seeks-to-avoid-messing.patch
609 +++ /dev/null
610 @@ -1,62 +0,0 @@
611 -From 470e2804c01b609532d95539c66ebb6d13c7f805 Mon Sep 17 00:00:00 2001
612 -From: Cory Fields <theuni-nospam-@xbmc.org>
613 -Date: Fri, 9 Jul 2010 17:36:00 -0400
614 -Subject: [PATCH 27/36] changed: check return value of seeks to avoid messing up current stream location
615 -
616 ----
617 - libavformat/avidec.c | 16 ++++++++++++----
618 - 1 files changed, 12 insertions(+), 4 deletions(-)
619 -
620 -diff --git a/libavformat/avidec.c b/libavformat/avidec.c
621 -index 3d223b7..45ed8be 100644
622 ---- a/libavformat/avidec.c
623 -+++ b/libavformat/avidec.c
624 -@@ -206,13 +206,18 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){
625 - return -1;
626 - }
627 -
628 -- url_fseek(pb, offset+8, SEEK_SET);
629 -+ if(url_fseek(pb, offset+8, SEEK_SET) < 0)
630 -+ return -1;
631 - avi->odml_depth++;
632 - read_braindead_odml_indx(s, frame_num);
633 - avi->odml_depth--;
634 - frame_num += duration;
635 -
636 -- url_fseek(pb, pos, SEEK_SET);
637 -+ if(url_fseek(pb, pos, SEEK_SET) < 0) {
638 -+ av_log(s, AV_LOG_ERROR, "Failed to restore position after reading index");
639 -+ return -1;
640 -+ }
641 -+
642 - }
643 - }
644 - avi->index_loaded=1;
645 -@@ -1287,11 +1292,13 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
646 - /* the av_index_search_timestamp call above. */
647 - assert(stream_index == 0);
648 -
649 -+ if(url_fseek(s->pb, pos, SEEK_SET) < 0)
650 -+ return -1;
651 -+
652 - /* Feed the DV video stream version of the timestamp to the */
653 - /* DV demux so it can synthesize correct timestamps. */
654 - dv_offset_reset(avi->dv_demux, timestamp);
655 -
656 -- url_fseek(s->pb, pos, SEEK_SET);
657 - avi->stream_index= -1;
658 - return 0;
659 - }
660 -@@ -1333,7 +1340,8 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
661 - }
662 -
663 - /* do the seek */
664 -- url_fseek(s->pb, pos, SEEK_SET);
665 -+ if(url_fseek(s->pb, pos, SEEK_SET) < 0)
666 -+ return -1;
667 - avi->stream_index= -1;
668 - return 0;
669 - }
670 ---
671 -1.7.3
672 -
673 diff --git a/lib/ffmpeg/patches/0028-fixed-if-lavc-s-mpeg2-decoder-was-asked-to-drop-a-fr.patch b/lib/ffmpeg/patches/0028-fixed-if-lavc-s-mpeg2-decoder-was-asked-to-drop-a-fr.patch
674 deleted file mode 100644
675 index 2c1ef30..0000000
676 --- a/lib/ffmpeg/patches/0028-fixed-if-lavc-s-mpeg2-decoder-was-asked-to-drop-a-fr.patch
677 +++ /dev/null
678 @@ -1,26 +0,0 @@
679 -From 937ab2b921e37b8e17edef2bb5a8b3a476d20fd8 Mon Sep 17 00:00:00 2001
680 -From: elupus <elupus@568bbfeb-2a22-0410-94d2-cc84cf5bfa90>
681 -Date: Wed, 29 Sep 2010 21:18:03 +0000
682 -Subject: [PATCH 28/36] fixed: if lavc's mpeg2 decoder was asked to drop a frame, it would still output an old frame, and mess up timestamps
683 -
684 -git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34307 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
685 ----
686 - libavcodec/mpeg12.c | 2 +-
687 - 1 files changed, 1 insertions(+), 1 deletions(-)
688 -
689 -diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
690 -index 3c73627..6254abb 100644
691 ---- a/libavcodec/mpeg12.c
692 -+++ b/libavcodec/mpeg12.c
693 -@@ -1911,7 +1911,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
694 - ff_xvmc_field_end(s);
695 -
696 - /* end of slice reached */
697 -- if (/*s->mb_y<<field_pic == s->mb_height &&*/ !s->first_field) {
698 -+ if (/*s->mb_y<<field_pic == s->mb_height &&*/ !s->first_field && !s->first_slice) {
699 - /* end of image */
700 -
701 - s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_MPEG2;
702 ---
703 -1.7.3
704 -
705 diff --git a/lib/ffmpeg/patches/0029-fixed-if-container-doesn-t-contain-timestamps-for-al.patch b/lib/ffmpeg/patches/0029-fixed-if-container-doesn-t-contain-timestamps-for-al.patch
706 deleted file mode 100644
707 index 62fda88..0000000
708 --- a/lib/ffmpeg/patches/0029-fixed-if-container-doesn-t-contain-timestamps-for-al.patch
709 +++ /dev/null
710 @@ -1,29 +0,0 @@
711 -From ab91f9fecf9ac6e38dbf5d9ed65a5bd123a4c031 Mon Sep 17 00:00:00 2001
712 -From: elupus <elupus@568bbfeb-2a22-0410-94d2-cc84cf5bfa90>
713 -Date: Tue, 19 Oct 2010 21:07:10 +0000
714 -Subject: [PATCH 29/36] fixed: if container doesn't contain timestamps for all dts packets, lavf used wrong duration of packet to fill in the blanks
715 -
716 -The issue was discussed here: http://forum.xbmc.org/showthread.php?t=82896
717 -
718 -Ps. The DTS parser is really lacking. It doesn't fill in anything, it only slices up the frames. So if this value changes mid stream, we will start calculating this wrong again. I'm pondering if we should just stop trying to fill in the blanks.
719 -
720 -git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34863 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
721 ----
722 - libavcodec/dca.c | 1 +
723 - 1 files changed, 1 insertions(+), 0 deletions(-)
724 -
725 -diff --git a/libavcodec/dca.c b/libavcodec/dca.c
726 -index 63ea329..2e2b37f 100644
727 ---- a/libavcodec/dca.c
728 -+++ b/libavcodec/dca.c
729 -@@ -1642,6 +1642,7 @@ static int dca_decode_frame(AVCodecContext * avctx,
730 - //set AVCodec values with parsed data
731 - avctx->sample_rate = s->sample_rate;
732 - avctx->bit_rate = s->bit_rate;
733 -+ avctx->frame_size = s->sample_blocks * 32;
734 -
735 - s->profile = FF_PROFILE_DTS;
736 -
737 ---
738 -1.7.3
739 -
740 diff --git a/lib/ffmpeg/patches/0031-fixed-vp3-decoder-should-set-key_frame-field-of-AVFr.patch b/lib/ffmpeg/patches/0031-fixed-vp3-decoder-should-set-key_frame-field-of-AVFr.patch
741 deleted file mode 100644
742 index 55650c0..0000000
743 --- a/lib/ffmpeg/patches/0031-fixed-vp3-decoder-should-set-key_frame-field-of-AVFr.patch
744 +++ /dev/null
745 @@ -1,25 +0,0 @@
746 -From 23c286841dda2df21bb05917ff6895bec1854f61 Mon Sep 17 00:00:00 2001
747 -From: elupus <elupus@svn>
748 -Date: Tue, 14 Sep 2010 00:42:57 +0000
749 -Subject: [PATCH 31/36] fixed: vp3 decoder should set key_frame field of AVFrame
750 -
751 -git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33768 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
752 ----
753 - libavcodec/vp3.c | 1 +
754 - 1 files changed, 1 insertions(+), 0 deletions(-)
755 -
756 -diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
757 -index 06f55f6..d634fca 100644
758 ---- a/libavcodec/vp3.c
759 -+++ b/libavcodec/vp3.c
760 -@@ -1765,6 +1765,7 @@ static int vp3_decode_frame(AVCodecContext *avctx,
761 -
762 - s->current_frame.reference = 3;
763 - s->current_frame.pict_type = s->keyframe ? FF_I_TYPE : FF_P_TYPE;
764 -+ s->current_frame.key_frame = s->keyframe;
765 - if (avctx->get_buffer(avctx, &s->current_frame) < 0) {
766 - av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
767 - goto error;
768 ---
769 -1.7.3
770 -
771 diff --git a/lib/ffmpeg/patches/0036-swscale-fix-build-with-enable-runtime-cpudetect-disa.patch b/lib/ffmpeg/patches/0036-swscale-fix-build-with-enable-runtime-cpudetect-disa.patch
772 deleted file mode 100644
773 index 3c4a8b7..0000000
774 --- a/lib/ffmpeg/patches/0036-swscale-fix-build-with-enable-runtime-cpudetect-disa.patch
775 +++ /dev/null
776 @@ -1,56 +0,0 @@
777 -From 189505c7a47007ae25fe9d4c46787c3ef9378dc9 Mon Sep 17 00:00:00 2001
778 -From: Anssi Hannula <anssi.hannula@iki.fi>
779 -Date: Wed, 2 Feb 2011 19:36:23 +0200
780 -Subject: [PATCH 36/36] swscale: fix build with --enable-runtime-cpudetect --disable-mmx/mmx2/amd3dnow
781 -
782 -Commit 0fc29f2708a "swscale: simplify selection of optimizations to
783 -compile." (25 Aug 2010) changed the behaviour so that with
784 ---enable-runtime-cpudetect --disable-mmx/mmx2/amd3dnow the instruction
785 -sets are actually disabled.
786 -
787 -However, ff_getSwsFunc() still calls the respective initialization
788 -functions which no longer exist, causing a build failure.
789 -
790 -Fix that by putting those calls under #if as well.
791 ----
792 - libswscale/swscale.c | 15 +++++++++++----
793 - 1 files changed, 11 insertions(+), 4 deletions(-)
794 -
795 -diff --git a/libswscale/swscale.c b/libswscale/swscale.c
796 -index 375171f..8d7bb73 100644
797 ---- a/libswscale/swscale.c
798 -+++ b/libswscale/swscale.c
799 -@@ -1262,19 +1262,26 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
800 -
801 - #if ARCH_X86
802 - // ordered per speed fastest first
803 -+#if COMPILE_MMX2
804 - if (flags & SWS_CPU_CAPS_MMX2) {
805 - sws_init_swScale_MMX2(c);
806 - return swScale_MMX2;
807 -- } else if (flags & SWS_CPU_CAPS_3DNOW) {
808 -+ }
809 -+#endif
810 -+#if COMPILE_3DNOW
811 -+ if (flags & SWS_CPU_CAPS_3DNOW) {
812 - sws_init_swScale_3DNow(c);
813 - return swScale_3DNow;
814 -- } else if (flags & SWS_CPU_CAPS_MMX) {
815 -+ }
816 -+#endif
817 -+#if COMPILE_MMX
818 -+ if (flags & SWS_CPU_CAPS_MMX) {
819 - sws_init_swScale_MMX(c);
820 - return swScale_MMX;
821 -- } else {
822 -+ }
823 -+#endif
824 - sws_init_swScale_C(c);
825 - return swScale_C;
826 -- }
827 -
828 - #else
829 - #if COMPILE_ALTIVEC
830 ---
831 -1.7.3
832 -
833 diff --git a/lib/ffmpeg/patches/0038-rtsp-Don-t-store-RTSPStream-in-AVStream-priv_data.patch b/lib/ffmpeg/patches/0038-rtsp-Don-t-store-RTSPStream-in-AVStream-priv_data.patch
834 deleted file mode 100644
835 index d87a1cf..0000000
836 --- a/lib/ffmpeg/patches/0038-rtsp-Don-t-store-RTSPStream-in-AVStream-priv_data.patch
837 +++ /dev/null
838 @@ -1,108 +0,0 @@
839 -From b1eb9860a582ec9459e871c00f23b5fc2500aaf4 Mon Sep 17 00:00:00 2001
840 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
841 -Date: Wed, 2 Feb 2011 11:08:01 +0200
842 -Subject: [PATCH] rtsp: Don't store RTSPStream in AVStream->priv_data
843 -
844 -For mpegts in RTP, there isn't a direct mapping between RTSPStreams
845 -and AVStreams, and the RTSPStream isn't ever stored in
846 -AVStream->priv_data, which was earlier leaked. The fix for this
847 -leak, in ea7f080749d68a431226ce196014da38761a0d82, lead to
848 -double frees for other, normal RTP streams.
849 -
850 -This patch avoids storing RTSPStreams in AVStream->priv_data, thus
851 -avoiding the double free. The RTSPStreams are always available via
852 -RTSPState->rtsp_streams anyway.
853 -
854 -Tested with MS-RTSP, RealRTSP, DSS and mpegts/RTP.
855 -
856 -Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
857 -(cherry picked from commit d9c0510e22821baa364306d867ffac45da0620c8)
858 ----
859 - libavformat/rtsp.c | 16 ++++++----------
860 - libavformat/rtspenc.c | 2 --
861 - 2 files changed, 6 insertions(+), 12 deletions(-)
862 -
863 -diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
864 -index 09e2f1e..e1d7503 100644
865 ---- a/libavformat/rtsp.c
866 -+++ b/libavformat/rtsp.c
867 -@@ -273,8 +273,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
868 - s1->default_ip = sdp_ip;
869 - s1->default_ttl = ttl;
870 - } else {
871 -- st = s->streams[s->nb_streams - 1];
872 -- rtsp_st = st->priv_data;
873 -+ rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1];
874 - rtsp_st->sdp_ip = sdp_ip;
875 - rtsp_st->sdp_ttl = ttl;
876 - }
877 -@@ -326,7 +325,6 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
878 - st = av_new_stream(s, 0);
879 - if (!st)
880 - return;
881 -- st->priv_data = rtsp_st;
882 - rtsp_st->stream_index = st->index;
883 - st->codec->codec_type = codec_type;
884 - if (rtsp_st->sdp_payload_type < RTP_PT_PRIVATE) {
885 -@@ -355,8 +353,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
886 - } else {
887 - char proto[32];
888 - /* get the control url */
889 -- st = s->streams[s->nb_streams - 1];
890 -- rtsp_st = st->priv_data;
891 -+ rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1];
892 -
893 - /* XXX: may need to add full url resolution */
894 - av_url_split(proto, sizeof(proto), NULL, 0, NULL, 0,
895 -@@ -377,7 +374,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
896 - get_word(buf1, sizeof(buf1), &p);
897 - payload_type = atoi(buf1);
898 - st = s->streams[s->nb_streams - 1];
899 -- rtsp_st = st->priv_data;
900 -+ rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1];
901 - sdp_parse_rtpmap(s, st, rtsp_st, payload_type, p);
902 - } else if (av_strstart(p, "fmtp:", &p) ||
903 - av_strstart(p, "framesize:", &p)) {
904 -@@ -385,9 +382,8 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
905 - // let dynamic protocol handlers have a stab at the line.
906 - get_word(buf1, sizeof(buf1), &p);
907 - payload_type = atoi(buf1);
908 -- for (i = 0; i < s->nb_streams; i++) {
909 -- st = s->streams[i];
910 -- rtsp_st = st->priv_data;
911 -+ for (i = 0; i < rt->nb_rtsp_streams; i++) {
912 -+ rtsp_st = rt->rtsp_streams[i];
913 - if (rtsp_st->sdp_payload_type == payload_type &&
914 - rtsp_st->dynamic_handler &&
915 - rtsp_st->dynamic_handler->parse_sdp_a_line)
916 -@@ -417,7 +413,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
917 - if (rt->server_type == RTSP_SERVER_REAL)
918 - ff_real_parse_sdp_a_line(s, s->nb_streams - 1, p);
919 -
920 -- rtsp_st = s->streams[s->nb_streams - 1]->priv_data;
921 -+ rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1];
922 - if (rtsp_st->dynamic_handler &&
923 - rtsp_st->dynamic_handler->parse_sdp_a_line)
924 - rtsp_st->dynamic_handler->parse_sdp_a_line(s,
925 -diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c
926 -index d54be1a..34deeeb 100644
927 ---- a/libavformat/rtspenc.c
928 -+++ b/libavformat/rtspenc.c
929 -@@ -79,14 +79,12 @@ int ff_rtsp_setup_output_streams(AVFormatContext *s, const char *addr)
930 - /* Set up the RTSPStreams for each AVStream */
931 - for (i = 0; i < s->nb_streams; i++) {
932 - RTSPStream *rtsp_st;
933 -- AVStream *st = s->streams[i];
934 -
935 - rtsp_st = av_mallocz(sizeof(RTSPStream));
936 - if (!rtsp_st)
937 - return AVERROR(ENOMEM);
938 - dynarray_add(&rt->rtsp_streams, &rt->nb_rtsp_streams, rtsp_st);
939 -
940 -- st->priv_data = rtsp_st;
941 - rtsp_st->stream_index = i;
942 -
943 - av_strlcpy(rtsp_st->control_url, rt->control_uri, sizeof(rtsp_st->control_url));
944 ---
945 -1.7.3
946 -
947 diff --git a/lib/ffmpeg/patches/0039-spdifenc-fix-byte-order-on-big-endian-systems.patch b/lib/ffmpeg/patches/0039-spdifenc-fix-byte-order-on-big-endian-systems.patch
948 deleted file mode 100644
949 index fb8bc68..0000000
950 --- a/lib/ffmpeg/patches/0039-spdifenc-fix-byte-order-on-big-endian-systems.patch
951 +++ /dev/null
952 @@ -1,121 +0,0 @@
953 -From a8dd9e056114a80d11c77efbdfe4b22610f452db Mon Sep 17 00:00:00 2001
954 -From: Anssi Hannula <anssi.hannula@iki.fi>
955 -Date: Mon, 27 Dec 2010 05:16:54 +0200
956 -Subject: [PATCH] spdifenc: fix byte order on big-endian systems
957 -
958 -There is a check for HAVE_BIGENDIAN when outputting the IEC 61937
959 -stream. On big-endian systems the payload data is not byteswapped,
960 -causing in effect the outputted payload data to be in a different byte
961 -order on big-endian than on little-endian systems.
962 -
963 -However, the IEC 61937 preamble (and the final odd byte if present) is
964 -always outputted in the same byte order. This means that on big-endian
965 -systems the headers have a different byte order than the payload,
966 -preventing useful use of the output.
967 -
968 -Fix that by outputting the data in a format suitable for sending to an
969 -audio device in S16LE format by default. Output as big-endian (S16BE)
970 -is added as an AVOption. This makes the muxer output the same on all
971 -archs by default.
972 -
973 ----
974 -
975 -Other ways to fix this would be to
976 -a) simply always output in little-endian format, or
977 -b) always output in native-endian format (i.e. different muxer output
978 -depending on arch), or
979 -c) have two different logical muxers.
980 ----
981 - libavformat/spdifenc.c | 35 +++++++++++++++++++++++++++++------
982 - 1 files changed, 29 insertions(+), 6 deletions(-)
983 -
984 -diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
985 -index 3eea31e..9b0001c 100644
986 ---- a/libavformat/spdifenc.c
987 -+++ b/libavformat/spdifenc.c
988 -@@ -49,6 +49,7 @@
989 - #include "libavcodec/ac3.h"
990 - #include "libavcodec/dca.h"
991 - #include "libavcodec/aacadtsdec.h"
992 -+#include "libavutil/opt.h"
993 -
994 - typedef struct IEC61937Context {
995 - enum IEC61937DataType data_type;///< burst info - reference to type of payload of the data-burst
996 -@@ -68,11 +69,22 @@ typedef struct IEC61937Context {
997 - int hd_buf_count; ///< number of frames in the hd audio buffer
998 - int hd_buf_filled; ///< amount of bytes in the hd audio buffer
999 -
1000 -+ /* AVOptions: */
1001 -+#define SPDIF_FLAG_BIGENDIAN 0x01
1002 -+ int spdif_flags;
1003 -+
1004 - /// function, which generates codec dependent header information.
1005 - /// Sets data_type and pkt_offset, and length_code, out_bytes, out_buf if necessary
1006 - int (*header_info) (AVFormatContext *s, AVPacket *pkt);
1007 - } IEC61937Context;
1008 -
1009 -+static const AVOption options[] = {
1010 -+{ "spdif_flags", "IEC 61937 encapsulation flags", offsetof(IEC61937Context, spdif_flags), FF_OPT_TYPE_FLAGS, 0, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "spdif_flags" },
1011 -+{ "be", "output in big-endian format (for use as s16be)", 0, FF_OPT_TYPE_CONST, SPDIF_FLAG_BIGENDIAN, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "spdif_flags" },
1012 -+{ NULL },
1013 -+};
1014 -+
1015 -+static const AVClass class = { "spdif", av_default_item_name, options, LIBAVUTIL_VERSION_INT };
1016 -
1017 - static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)
1018 - {
1019 -@@ -330,6 +342,15 @@ static int spdif_write_trailer(AVFormatContext *s)
1020 - return 0;
1021 - }
1022 -
1023 -+static void spdif_put_16(struct AVFormatContext *s, unsigned int val)
1024 -+{
1025 -+ IEC61937Context *ctx = s->priv_data;
1026 -+ if (ctx->spdif_flags & SPDIF_FLAG_BIGENDIAN)
1027 -+ put_be16(s->pb, val);
1028 -+ else
1029 -+ put_le16(s->pb, val);
1030 -+}
1031 -+
1032 - static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
1033 - {
1034 - IEC61937Context *ctx = s->priv_data;
1035 -@@ -354,13 +375,13 @@ static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
1036 - }
1037 -
1038 - if (ctx->use_preamble) {
1039 -- put_le16(s->pb, SYNCWORD1); //Pa
1040 -- put_le16(s->pb, SYNCWORD2); //Pb
1041 -- put_le16(s->pb, ctx->data_type); //Pc
1042 -- put_le16(s->pb, ctx->length_code);//Pd
1043 -+ spdif_put_16(s, SYNCWORD1); //Pa
1044 -+ spdif_put_16(s, SYNCWORD2); //Pb
1045 -+ spdif_put_16(s, ctx->data_type); //Pc
1046 -+ spdif_put_16(s, ctx->length_code);//Pd
1047 - }
1048 -
1049 -- if (HAVE_BIGENDIAN ^ ctx->extra_bswap) {
1050 -+ if (ctx->extra_bswap ^ (ctx->spdif_flags & SPDIF_FLAG_BIGENDIAN)) {
1051 - put_buffer(s->pb, ctx->out_buf, ctx->out_bytes & ~1);
1052 - } else {
1053 - av_fast_malloc(&ctx->buffer, &ctx->buffer_size, ctx->out_bytes + FF_INPUT_BUFFER_PADDING_SIZE);
1054 -@@ -370,8 +391,9 @@ static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
1055 - put_buffer(s->pb, ctx->buffer, ctx->out_bytes & ~1);
1056 - }
1057 -
1058 -+ /* a final lone byte has to be MSB aligned */
1059 - if (ctx->out_bytes & 1)
1060 -- put_be16(s->pb, ctx->out_buf[ctx->out_bytes - 1]);
1061 -+ spdif_put_16(s, ctx->out_buf[ctx->out_bytes - 1] << 8);
1062 -
1063 - put_nbyte(s->pb, 0, padding);
1064 -
1065 -@@ -393,4 +415,5 @@ AVOutputFormat ff_spdif_muxer = {
1066 - spdif_write_header,
1067 - spdif_write_packet,
1068 - spdif_write_trailer,
1069 -+ .priv_class = &class,
1070 - };
1071 ---
1072 -1.7.3
1073 -
1074 diff --git a/lib/ffmpeg/patches/0040-Add-our-MAX_STREAMS-hack-back-it-was-lost-after-the-.patch b/lib/ffmpeg/patches/0040-Add-our-MAX_STREAMS-hack-back-it-was-lost-after-the-.patch
1075 deleted file mode 100644
1076 index 25b0541..0000000
1077 --- a/lib/ffmpeg/patches/0040-Add-our-MAX_STREAMS-hack-back-it-was-lost-after-the-.patch
1078 +++ /dev/null
1079 @@ -1,28 +0,0 @@
1080 -From 03e5595ec1d5a87d61a67443634b0c56af7cd22c Mon Sep 17 00:00:00 2001
1081 -From: theuni <theuni-nospam-@xbmc.org>
1082 -Date: Mon, 7 Feb 2011 16:00:50 -0500
1083 -Subject: [PATCH] Add our MAX_STREAMS hack back, it was lost after the ffmpeg update.
1084 -
1085 -Fixes playback of some streams (one of my test mkvs).
1086 -
1087 -This should be removed on ffmpeg major version bump.
1088 ----
1089 - lib/ffmpeg/libavformat/avformat.h | 2 +-
1090 - 1 files changed, 1 insertions(+), 1 deletions(-)
1091 -
1092 -diff --git a/lib/ffmpeg/libavformat/avformat.h b/lib/ffmpeg/libavformat/avformat.h
1093 -index f9f9be5..dec8091 100644
1094 ---- a/lib/ffmpeg/libavformat/avformat.h
1095 -+++ b/lib/ffmpeg/libavformat/avformat.h
1096 -@@ -667,7 +667,7 @@ typedef struct AVChapter {
1097 - } AVChapter;
1098 -
1099 - #if FF_API_MAX_STREAMS
1100 --#define MAX_STREAMS 20
1101 -+#define MAX_STREAMS 100
1102 - #endif
1103 -
1104 - /**
1105 ---
1106 -1.7.3
1107 -
1108 diff --git a/lib/ffmpeg/patches/0041-lavf-update-ff_probe_input_buffer-documentation.patch b/lib/ffmpeg/patches/0041-lavf-update-ff_probe_input_buffer-documentation.patch
1109 deleted file mode 100644
1110 index 392fdab..0000000
1111 --- a/lib/ffmpeg/patches/0041-lavf-update-ff_probe_input_buffer-documentation.patch
1112 +++ /dev/null
1113 @@ -1,29 +0,0 @@
1114 -From acdac292f7c1691d21e19c1e9a993e501883fd6b Mon Sep 17 00:00:00 2001
1115 -From: Anssi Hannula <anssi.hannula@iki.fi>
1116 -Date: Tue, 8 Feb 2011 00:46:51 +0200
1117 -Subject: [PATCH 41/43] lavf: update ff_probe_input_buffer documentation
1118 -
1119 -It never reopens the bytestream anymore.
1120 -
1121 -Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
1122 -(cherry picked from commit 4d016dd4e5b288b3c0c7396935326cb07a289ac2)
1123 ----
1124 - libavformat/internal.h | 2 +-
1125 - 1 files changed, 1 insertions(+), 1 deletions(-)
1126 -
1127 -diff --git a/libavformat/internal.h b/libavformat/internal.h
1128 -index b401d35..a17d9c6 100644
1129 ---- a/libavformat/internal.h
1130 -+++ b/libavformat/internal.h
1131 -@@ -88,7 +88,7 @@ uint64_t ff_ntp_time(void);
1132 - * attempt is made. When the maximum probe size is reached, the input format
1133 - * with the highest score is returned.
1134 - *
1135 -- * @param pb the bytestream to probe, it may be closed and opened again
1136 -+ * @param pb the bytestream to probe
1137 - * @param fmt the input format is put here
1138 - * @param filename the filename of the stream
1139 - * @param logctx the log context
1140 ---
1141 -1.7.3
1142 -
1143 diff --git a/lib/ffmpeg/patches/0042-lavf-simplify-pb-parameter-of-ff_probe_input_buffer.patch b/lib/ffmpeg/patches/0042-lavf-simplify-pb-parameter-of-ff_probe_input_buffer.patch
1144 deleted file mode 100644
1145 index f2b8baf..0000000
1146 --- a/lib/ffmpeg/patches/0042-lavf-simplify-pb-parameter-of-ff_probe_input_buffer.patch
1147 +++ /dev/null
1148 @@ -1,71 +0,0 @@
1149 -From c0cbd02d3bcd49f4258a9ba86004e70a56bb3a64 Mon Sep 17 00:00:00 2001
1150 -From: Anssi Hannula <anssi.hannula@iki.fi>
1151 -Date: Tue, 8 Feb 2011 00:46:52 +0200
1152 -Subject: [PATCH 42/43] lavf: simplify pb parameter of ff_probe_input_buffer
1153 -
1154 -There is no need to pass the ByteIOContext via a pointer to a pointer
1155 -anymore.
1156 -
1157 -Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
1158 -(cherry picked from commit aad216fd7e3209fe0a865d8751e680925f6654d3)
1159 ----
1160 - libavformat/internal.h | 2 +-
1161 - libavformat/utils.c | 8 ++++----
1162 - 2 files changed, 5 insertions(+), 5 deletions(-)
1163 -
1164 -diff --git a/libavformat/internal.h b/libavformat/internal.h
1165 -index a17d9c6..f2f3ddc 100644
1166 ---- a/libavformat/internal.h
1167 -+++ b/libavformat/internal.h
1168 -@@ -97,7 +97,7 @@ uint64_t ff_ntp_time(void);
1169 - * @return 0 in case of success, a negative value corresponding to an
1170 - * AVERROR code otherwise
1171 - */
1172 --int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt,
1173 -+int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
1174 - const char *filename, void *logctx,
1175 - unsigned int offset, unsigned int max_probe_size);
1176 -
1177 -diff --git a/libavformat/utils.c b/libavformat/utils.c
1178 -index e2881ba..f5b22a2 100644
1179 ---- a/libavformat/utils.c
1180 -+++ b/libavformat/utils.c
1181 -@@ -524,7 +524,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
1182 - #define PROBE_BUF_MIN 2048
1183 - #define PROBE_BUF_MAX (1<<20)
1184 -
1185 --int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt,
1186 -+int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
1187 - const char *filename, void *logctx,
1188 - unsigned int offset, unsigned int max_probe_size)
1189 - {
1190 -@@ -555,7 +555,7 @@ int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt,
1191 -
1192 - /* read probe data */
1193 - buf = av_realloc(buf, probe_size + AVPROBE_PADDING_SIZE);
1194 -- if ((ret = get_buffer(*pb, buf + buf_offset, probe_size - buf_offset)) < 0) {
1195 -+ if ((ret = get_buffer(pb, buf + buf_offset, probe_size - buf_offset)) < 0) {
1196 - /* fail if error was not end of file, otherwise, lower score */
1197 - if (ret != AVERROR_EOF) {
1198 - av_free(buf);
1199 -@@ -585,7 +585,7 @@ int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt,
1200 - }
1201 -
1202 - /* rewind. reuse probe buffer to avoid seeking */
1203 -- if ((ret = ff_rewind_with_probe_data(*pb, buf, pd.buf_size)) < 0)
1204 -+ if ((ret = ff_rewind_with_probe_data(pb, buf, pd.buf_size)) < 0)
1205 - av_free(buf);
1206 -
1207 - return ret;
1208 -@@ -622,7 +622,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
1209 - if (buf_size > 0) {
1210 - url_setbufsize(pb, buf_size);
1211 - }
1212 -- if (!fmt && (err = ff_probe_input_buffer(&pb, &fmt, filename, logctx, 0, logctx ? (*ic_ptr)->probesize : 0)) < 0) {
1213 -+ if (!fmt && (err = ff_probe_input_buffer(pb, &fmt, filename, logctx, 0, logctx ? (*ic_ptr)->probesize : 0)) < 0) {
1214 - goto fail;
1215 - }
1216 - }
1217 ---
1218 -1.7.3
1219 -
1220 diff --git a/lib/ffmpeg/patches/0043-lavf-rename-ff_probe_input_buffer-to-make-it-public.patch b/lib/ffmpeg/patches/0043-lavf-rename-ff_probe_input_buffer-to-make-it-public.patch
1221 deleted file mode 100644
1222 index d70e272..0000000
1223 --- a/lib/ffmpeg/patches/0043-lavf-rename-ff_probe_input_buffer-to-make-it-public.patch
1224 +++ /dev/null
1225 @@ -1,100 +0,0 @@
1226 -From 90a931ab9378be64cdffb33f8490b6891ebb9ad8 Mon Sep 17 00:00:00 2001
1227 -From: Anssi Hannula <anssi.hannula@iki.fi>
1228 -Date: Tue, 8 Feb 2011 00:46:53 +0200
1229 -Subject: [PATCH 43/43] lavf: rename ff_probe_input_buffer to make it public
1230 -
1231 -It is useful for applications that hand input data directly to lavf via
1232 -a ByteIOContext.
1233 -
1234 -Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
1235 ----
1236 - libavformat/avformat.h | 19 +++++++++++++++++++
1237 - libavformat/internal.h | 19 -------------------
1238 - libavformat/utils.c | 4 ++--
1239 - 3 files changed, 21 insertions(+), 21 deletions(-)
1240 -
1241 -diff --git a/libavformat/avformat.h b/libavformat/avformat.h
1242 -index dec8091..a08d843 100644
1243 ---- a/libavformat/avformat.h
1244 -+++ b/libavformat/avformat.h
1245 -@@ -1039,6 +1039,25 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
1246 - AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
1247 -
1248 - /**
1249 -+ * Probe a bytestream to determine the input format. Each time a probe returns
1250 -+ * with a score that is too low, the probe buffer size is increased and another
1251 -+ * attempt is made. When the maximum probe size is reached, the input format
1252 -+ * with the highest score is returned.
1253 -+ *
1254 -+ * @param pb the bytestream to probe
1255 -+ * @param fmt the input format is put here
1256 -+ * @param filename the filename of the stream
1257 -+ * @param logctx the log context
1258 -+ * @param offset the offset within the bytestream to probe from
1259 -+ * @param max_probe_size the maximum probe buffer size (zero for default)
1260 -+ * @return 0 in case of success, a negative value corresponding to an
1261 -+ * AVERROR code otherwise
1262 -+ */
1263 -+int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
1264 -+ const char *filename, void *logctx,
1265 -+ unsigned int offset, unsigned int max_probe_size);
1266 -+
1267 -+/**
1268 - * Allocate all the structures needed to read an input stream.
1269 - * This does not open the needed codecs for decoding the stream[s].
1270 - */
1271 -diff --git a/libavformat/internal.h b/libavformat/internal.h
1272 -index f2f3ddc..738b59d 100644
1273 ---- a/libavformat/internal.h
1274 -+++ b/libavformat/internal.h
1275 -@@ -82,25 +82,6 @@ void ff_read_frame_flush(AVFormatContext *s);
1276 - /** Get the current time since NTP epoch in microseconds. */
1277 - uint64_t ff_ntp_time(void);
1278 -
1279 --/**
1280 -- * Probe a bytestream to determine the input format. Each time a probe returns
1281 -- * with a score that is too low, the probe buffer size is increased and another
1282 -- * attempt is made. When the maximum probe size is reached, the input format
1283 -- * with the highest score is returned.
1284 -- *
1285 -- * @param pb the bytestream to probe
1286 -- * @param fmt the input format is put here
1287 -- * @param filename the filename of the stream
1288 -- * @param logctx the log context
1289 -- * @param offset the offset within the bytestream to probe from
1290 -- * @param max_probe_size the maximum probe buffer size (zero for default)
1291 -- * @return 0 in case of success, a negative value corresponding to an
1292 -- * AVERROR code otherwise
1293 -- */
1294 --int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
1295 -- const char *filename, void *logctx,
1296 -- unsigned int offset, unsigned int max_probe_size);
1297 --
1298 - #if FF_API_URL_SPLIT
1299 - /**
1300 - * @deprecated use av_url_split() instead
1301 -diff --git a/libavformat/utils.c b/libavformat/utils.c
1302 -index f5b22a2..bee0475 100644
1303 ---- a/libavformat/utils.c
1304 -+++ b/libavformat/utils.c
1305 -@@ -524,7 +524,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
1306 - #define PROBE_BUF_MIN 2048
1307 - #define PROBE_BUF_MAX (1<<20)
1308 -
1309 --int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
1310 -+int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
1311 - const char *filename, void *logctx,
1312 - unsigned int offset, unsigned int max_probe_size)
1313 - {
1314 -@@ -622,7 +622,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
1315 - if (buf_size > 0) {
1316 - url_setbufsize(pb, buf_size);
1317 - }
1318 -- if (!fmt && (err = ff_probe_input_buffer(pb, &fmt, filename, logctx, 0, logctx ? (*ic_ptr)->probesize : 0)) < 0) {
1319 -+ if (!fmt && (err = av_probe_input_buffer(pb, &fmt, filename, logctx, 0, logctx ? (*ic_ptr)->probesize : 0)) < 0) {
1320 - goto fail;
1321 - }
1322 - }
1323 ---
1324 -1.7.3
1325 -
1326 diff --git a/lib/ffmpeg/patches/0044-MMS-also-discover-streams-in-extended-stream-propert.patch b/lib/ffmpeg/patches/0044-MMS-also-discover-streams-in-extended-stream-propert.patch
1327 deleted file mode 100644
1328 index 287b1fe..0000000
1329 --- a/lib/ffmpeg/patches/0044-MMS-also-discover-streams-in-extended-stream-propert.patch
1330 +++ /dev/null
1331 @@ -1,56 +0,0 @@
1332 -From 91861ce25c7f19c38afdb0f115bf90118fc19428 Mon Sep 17 00:00:00 2001
1333 -From: Marton Balint <cus@passwd.hu>
1334 -Date: Sat, 19 Feb 2011 17:33:15 +0100
1335 -Subject: [PATCH] MMS: also discover streams in extended stream properties object
1336 -
1337 -Allows playback of nonprimary audio streams in multiple bitrate sources,
1338 -such as mmsh://wmscr1.dr.dk/e02ch03m
1339 -
1340 -Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
1341 -(cherry picked from commit 74d6871d6244865b5863a01c3dab16a2f06a1706)
1342 ----
1343 - libavformat/mms.c | 28 ++++++++++++++++++++++++++++
1344 - 1 files changed, 28 insertions(+), 0 deletions(-)
1345 -
1346 -diff --git a/lib/ffmpeg/libavformat/mms.c b/lib/ffmpeg/libavformat/mms.c
1347 -index d995a43..b541208 100644
1348 ---- a/lib/ffmpeg/libavformat/mms.c
1349 -+++ b/lib/ffmpeg/libavformat/mms.c
1350 -@@ -115,6 +115,34 @@ int ff_mms_asf_header_parser(MMSContext *mms)
1351 - "Corrupt stream (too many A/V streams)\n");
1352 - return AVERROR_INVALIDDATA;
1353 - }
1354 -+ } else if (!memcmp(p, ff_asf_ext_stream_header, sizeof(ff_asf_guid))) {
1355 -+ if (end - p >= 88) {
1356 -+ int stream_count = AV_RL16(p + 84), ext_len_count = AV_RL16(p + 86);
1357 -+ uint64_t skip_bytes = 88;
1358 -+ while (stream_count--) {
1359 -+ if (end - p < skip_bytes + 4) {
1360 -+ av_log(NULL, AV_LOG_ERROR,
1361 -+ "Corrupt stream (next stream name length is not in the buffer)\n");
1362 -+ return AVERROR_INVALIDDATA;
1363 -+ }
1364 -+ skip_bytes += 4 + AV_RL16(p + skip_bytes + 2);
1365 -+ }
1366 -+ while (ext_len_count--) {
1367 -+ if (end - p < skip_bytes + 22) {
1368 -+ av_log(NULL, AV_LOG_ERROR,
1369 -+ "Corrupt stream (next extension system info length is not in the buffer)\n");
1370 -+ return AVERROR_INVALIDDATA;
1371 -+ }
1372 -+ skip_bytes += 22 + AV_RL32(p + skip_bytes + 18);
1373 -+ }
1374 -+ if (end - p < skip_bytes) {
1375 -+ av_log(NULL, AV_LOG_ERROR,
1376 -+ "Corrupt stream (the last extension system info length is invalid)\n");
1377 -+ return AVERROR_INVALIDDATA;
1378 -+ }
1379 -+ if (chunksize - skip_bytes > 24)
1380 -+ chunksize = skip_bytes;
1381 -+ }
1382 - } else if (!memcmp(p, ff_asf_head1_guid, sizeof(ff_asf_guid))) {
1383 - chunksize = 46; // see references [2] section 3.4. This should be set 46.
1384 - }
1385 ---
1386 -1.7.0.4
1387 -
1388 diff --git a/lib/ffmpeg/patches/0046-os_support-fix-poll-implementation.patch b/lib/ffmpeg/patches/0046-os_support-fix-poll-implementation.patch
1389 deleted file mode 100644
1390 index 262a086..0000000
1391 --- a/lib/ffmpeg/patches/0046-os_support-fix-poll-implementation.patch
1392 +++ /dev/null
1393 @@ -1,29 +0,0 @@
1394 -From 9ac2085dbf1821b7995fe360038c1bf0f3940032 Mon Sep 17 00:00:00 2001
1395 -From: Max Shakhmetov <shakhmetov.max@gmail.com>
1396 -Date: Tue, 15 Feb 2011 17:49:27 +0100
1397 -Subject: [PATCH] os_support: fix poll() implementation
1398 -
1399 -Our poll implementation does not iterate over the pollfd array properly
1400 -while setting the revents.
1401 -
1402 -Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
1403 ----
1404 - libavformat/os_support.c | 2 +-
1405 - 1 files changed, 1 insertions(+), 1 deletions(-)
1406 -
1407 -diff --git a/lib/ffmpeg/libavformat/os_support.c b/lib/ffmpeg/libavformat/os_support.c
1408 -index 4f73011..0b7b59e 100644
1409 ---- a/lib/ffmpeg/libavformat/os_support.c
1410 -+++ b/lib/ffmpeg/libavformat/os_support.c
1411 -@@ -292,7 +292,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout)
1412 - if (rc < 0)
1413 - return rc;
1414 -
1415 -- for(i = 0; i < (nfds_t) n; i++) {
1416 -+ for(i = 0; i < numfds; i++) {
1417 - fds[i].revents = 0;
1418 -
1419 - if (FD_ISSET(fds[i].fd, &read_set)) fds[i].revents |= POLLIN;
1420 ---
1421 -1.7.0.4
1422 -
1423 diff --git a/lib/ffmpeg/patches/0047-Backporting-ffmpeg-feature-to-parse-flv-fileposition.patch b/lib/ffmpeg/patches/0047-Backporting-ffmpeg-feature-to-parse-flv-fileposition.patch
1424 deleted file mode 100644
1425 index 500aa47..0000000
1426 --- a/lib/ffmpeg/patches/0047-Backporting-ffmpeg-feature-to-parse-flv-fileposition.patch
1427 +++ /dev/null
1428 @@ -1,105 +0,0 @@
1429 -From 7f608129d581ce028033e399a412cde7f37bc938 Mon Sep 17 00:00:00 2001
1430 -From: Dani <dani@INCOGNITO.(none)>
1431 -Date: Fri, 3 Jun 2011 00:02:06 -0400
1432 -Subject: [PATCH] Backporting ffmpeg feature to parse flv filepositions so we can seek to certain points in the stream without waiting to buffer, aka pseudostreaming
1433 -
1434 ----
1435 - lib/ffmpeg/libavformat/flvdec.c | 68 +++++++++++++++++++++++++++++++++++++++
1436 - 1 files changed, 68 insertions(+), 0 deletions(-)
1437 -
1438 -diff --git a/lib/ffmpeg/libavformat/flvdec.c b/lib/ffmpeg/libavformat/flvdec.c
1439 -index e6081d9..f1c9eda 100644
1440 ---- a/lib/ffmpeg/libavformat/flvdec.c
1441 -+++ b/lib/ffmpeg/libavformat/flvdec.c
1442 -@@ -30,6 +30,10 @@
1443 - #include "avformat.h"
1444 - #include "flv.h"
1445 -
1446 -+#define KEYFRAMES_TAG "keyframes"
1447 -+#define KEYFRAMES_TIMESTAMP_TAG "times"
1448 -+#define KEYFRAMES_BYTEOFFSET_TAG "filepositions"
1449 -+
1450 - typedef struct {
1451 - int wrong_dts; ///< wrong dts due to negative cts
1452 - } FLVContext;
1453 -@@ -124,6 +128,66 @@ static int amf_get_string(ByteIOContext *ioc, char *buffer, int buffsize) {
1454 - return length;
1455 - }
1456 -
1457 -+static int parse_keyframes_index(AVFormatContext *s, ByteIOContext *ioc, AVStream *vstream, int64_t max_pos) {
1458 -+ unsigned int timeslen = 0, fileposlen = 0, i;
1459 -+ char str_val[256];
1460 -+ int64_t *times = NULL;
1461 -+ int64_t *filepositions = NULL;
1462 -+ int ret = AVERROR(ENOSYS);
1463 -+ int64_t initial_pos = url_ftell(ioc);
1464 -+
1465 -+ while (url_ftell(ioc) < max_pos - 2 && amf_get_string(ioc, str_val, sizeof(str_val)) > 0) {
1466 -+ int64_t** current_array;
1467 -+ unsigned int arraylen;
1468 -+
1469 -+ // Expect array object in context
1470 -+ if (get_byte(ioc) != AMF_DATA_TYPE_ARRAY)
1471 -+ break;
1472 -+
1473 -+ arraylen = get_be32(ioc);
1474 -+ if(arraylen>>28)
1475 -+ break;
1476 -+
1477 -+ if (!strcmp(KEYFRAMES_TIMESTAMP_TAG , str_val) && !times){
1478 -+ current_array= &times;
1479 -+ timeslen= arraylen;
1480 -+ }else if (!strcmp(KEYFRAMES_BYTEOFFSET_TAG, str_val) && !filepositions){
1481 -+ current_array= &filepositions;
1482 -+ fileposlen= arraylen;
1483 -+ }else // unexpected metatag inside keyframes, will not use such metadata for indexing
1484 -+ break;
1485 -+
1486 -+ if (!(*current_array = av_mallocz(sizeof(**current_array) * arraylen))) {
1487 -+ ret = AVERROR(ENOMEM);
1488 -+ goto finish;
1489 -+ }
1490 -+
1491 -+ for (i = 0; i < arraylen && url_ftell(ioc) < max_pos - 1; i++) {
1492 -+ if (get_byte(ioc) != AMF_DATA_TYPE_NUMBER)
1493 -+ goto finish;
1494 -+ current_array[0][i] = av_int2dbl(get_be64(ioc));
1495 -+ }
1496 -+ if (times && filepositions) {
1497 -+ // All done, exiting at a position allowing amf_parse_object
1498 -+ // to finish parsing the object
1499 -+ ret = 0;
1500 -+ break;
1501 -+ }
1502 -+ }
1503 -+
1504 -+ if (timeslen == fileposlen) {
1505 -+ for(i = 0; i < timeslen; i++)
1506 -+ av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME);
1507 -+ } else
1508 -+ av_log(s, AV_LOG_WARNING, "Invalid keyframes object, skipping.\n");
1509 -+
1510 -+finish:
1511 -+ av_freep(&times);
1512 -+ av_freep(&filepositions);
1513 -+ url_fseek(ioc, initial_pos, SEEK_SET);
1514 -+ return ret;
1515 -+}
1516 -+
1517 - static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vstream, const char *key, int64_t max_pos, int depth) {
1518 - AVCodecContext *acodec, *vcodec;
1519 - ByteIOContext *ioc;
1520 -@@ -148,6 +212,10 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
1521 - case AMF_DATA_TYPE_OBJECT: {
1522 - unsigned int keylen;
1523 -
1524 -+ if (!url_is_streamed(s->pb) && key && !strcmp(KEYFRAMES_TAG, key) && depth == 1)
1525 -+ if (parse_keyframes_index(s, ioc, vstream, max_pos) < 0)
1526 -+ av_log(s, AV_LOG_ERROR, "Keyframe index parsing failed\n");
1527 -+
1528 - while(url_ftell(ioc) < max_pos - 2 && (keylen = get_be16(ioc))) {
1529 - url_fskip(ioc, keylen); //skip key string
1530 - if(amf_parse_object(s, NULL, NULL, NULL, max_pos, depth + 1) < 0)
1531 ---
1532 -1.7.0.4
1533 -
1534 diff --git a/lib/ffmpeg/patches/0048-Dont-mark-genereted-dummy-frame-as-keyframe.patch b/lib/ffmpeg/patches/0048-Dont-mark-genereted-dummy-frame-as-keyframe.patch
1535 deleted file mode 100644
1536 index 39e92bf..0000000
1537 --- a/lib/ffmpeg/patches/0048-Dont-mark-genereted-dummy-frame-as-keyframe.patch
1538 +++ /dev/null
1539 @@ -1,31 +0,0 @@
1540 -From fdf7deeb66155a71acf2e34766d376d50f81b43a Mon Sep 17 00:00:00 2001
1541 -From: elupus <elupus@xbmc.org>
1542 -Date: Fri, 22 Apr 2011 15:42:51 +0200
1543 -Subject: Don't mark generated dummy frame output from mpeg1/2 decoder as keyframe.
1544 -
1545 -We use this flag to tell when to assume decoded data is free
1546 -from artifacts after a seek. The mpeg1/2 decoder will generate
1547 -a dummy frame if decoding is started on a non keyframe. This
1548 -will sadly be output from decoder to player and displayed
1549 -as a gray screen.
1550 -
1551 -diff --git a/lib/ffmpeg/libavcodec/mpegvideo.c b/lib/ffmpeg/libavcodec/mpegvideo.c
1552 -index c8706bc..a0acda1 100644
1553 ---- a/lib/ffmpeg/libavcodec/mpegvideo.c
1554 -+++ b/lib/ffmpeg/libavcodec/mpegvideo.c
1555 -@@ -996,6 +996,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
1556 - /* Allocate a dummy frame */
1557 - i= ff_find_unused_picture(s, 0);
1558 - s->last_picture_ptr= &s->picture[i];
1559 -+ s->last_picture_ptr->key_frame = 0;
1560 - if(ff_alloc_picture(s, s->last_picture_ptr, 0) < 0)
1561 - return -1;
1562 - }
1563 -@@ -1003,6 +1004,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
1564 - /* Allocate a dummy frame */
1565 - i= ff_find_unused_picture(s, 0);
1566 - s->next_picture_ptr= &s->picture[i];
1567 -+ s->next_picture_ptr->key_frame = 0;
1568 - if(ff_alloc_picture(s, s->next_picture_ptr, 0) < 0)
1569 - return -1;
1570 - }
1571 diff --git a/lib/ffmpeg/patches/0049-Added-ability-to-enable-workaround-for-dxva2-decodin.patch b/lib/ffmpeg/patches/0049-Added-ability-to-enable-workaround-for-dxva2-decodin.patch
1572 deleted file mode 100644
1573 index e649057..0000000
1574 --- a/lib/ffmpeg/patches/0049-Added-ability-to-enable-workaround-for-dxva2-decodin.patch
1575 +++ /dev/null
1576 @@ -1,70 +0,0 @@
1577 -From f4a0791e9ee825ef54d370b82fce97c9cac92d26 Mon Sep 17 00:00:00 2001
1578 -From: Joakim Plate <elupus@ecce.se>
1579 -Date: Sun, 3 Jul 2011 17:18:50 +0200
1580 -Subject: [PATCH] Added ability to enable workaround for dxva2 decoding using older ATI cards
1581 -
1582 -The workaround need to be enabled per pci id which can not
1583 -be detected inside ffmpeg. So this adds a flag that enabled
1584 -the alternate behavior.
1585 ----
1586 - libavcodec/avcodec.h | 1 +
1587 - libavcodec/dxva2_h264.c | 14 ++++++++++++--
1588 - 2 files changed, 13 insertions(+), 2 deletions(-)
1589 -
1590 -diff --git a/lib/ffmpeg/libavcodec/avcodec.h b/lib/ffmpeg/libavcodec/avcodec.h
1591 -index 1eb10ab..d642203 100644
1592 ---- a/lib/ffmpeg/libavcodec/avcodec.h
1593 -+++ b/lib/ffmpeg/libavcodec/avcodec.h
1594 -@@ -1441,6 +1441,7 @@ typedef struct AVCodecContext {
1595 - #define FF_BUG_DC_CLIP 4096
1596 - #define FF_BUG_MS 8192 ///< Work around various bugs in Microsoft's broken decoders.
1597 - #define FF_BUG_TRUNCATED 16384
1598 -+#define FF_BUG_DXVA2_SCALING_LIST_ZIGZAG 32768 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
1599 - //#define FF_BUG_FAKE_SCALABILITY 16 //Autodetection should work 100%.
1600 -
1601 - /**
1602 -diff --git a/lib/ffmpeg/libavcodec/dxva2_h264.c b/lib/ffmpeg/libavcodec/dxva2_h264.c
1603 -index bc80e98..3ad8fcf 100644
1604 ---- a/lib/ffmpeg/libavcodec/dxva2_h264.c
1605 -+++ b/lib/ffmpeg/libavcodec/dxva2_h264.c
1606 -@@ -150,10 +150,19 @@ static void fill_picture_parameters(struct dxva_context *ctx, const H264Context
1607 - //pp->SliceGroupMap[810]; /* XXX not implemented by FFmpeg */
1608 - }
1609 -
1610 --static void fill_scaling_lists(const H264Context *h, DXVA_Qmatrix_H264 *qm)
1611 -+static void fill_scaling_lists(AVCodecContext *avctx, const H264Context *h, DXVA_Qmatrix_H264 *qm)
1612 - {
1613 - unsigned i, j;
1614 - memset(qm, 0, sizeof(*qm));
1615 -+ if (avctx->workaround_bugs & FF_BUG_DXVA2_SCALING_LIST_ZIGZAG) { // For old UVD/UVD+ ATI cards
1616 -+ for (i = 0; i < 6; i++)
1617 -+ for (j = 0; j < 16; j++)
1618 -+ qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][j];
1619 -+
1620 -+ for (i = 0; i < 2; i++)
1621 -+ for (j = 0; j < 64; j++)
1622 -+ qm->bScalingLists8x8[i][j] = h->pps.scaling_matrix8[i][j];
1623 -+ } else {
1624 - for (i = 0; i < 6; i++)
1625 - for (j = 0; j < 16; j++)
1626 - qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][zigzag_scan[j]];
1627 -@@ -161,6 +170,7 @@ static void fill_scaling_lists(const H264Context *h, DXVA_Qmatrix_H264 *qm)
1628 - for (i = 0; i < 2; i++)
1629 - for (j = 0; j < 64; j++)
1630 - qm->bScalingLists8x8[i][j] = h->pps.scaling_matrix8[i][ff_zigzag_direct[j]];
1631 -+ }
1632 - }
1633 -
1634 - static int is_slice_short(struct dxva_context *ctx)
1635 -@@ -370,7 +380,7 @@ static int start_frame(AVCodecContext *avctx,
1636 - fill_picture_parameters(ctx, h, &ctx_pic->pp);
1637 -
1638 - /* Fill up DXVA_Qmatrix_H264 */
1639 -- fill_scaling_lists(h, &ctx_pic->qm);
1640 -+ fill_scaling_lists(avctx, h, &ctx_pic->qm);
1641 -
1642 - ctx_pic->slice_count = 0;
1643 - ctx_pic->bitstream_size = 0;
1644 ---
1645 -1.7.4.msysgit.0
1646 -
1647 diff --git a/lib/ffmpeg/patches/0050-Patch-for-memory-leaks-in-DVB-subtitles-decoder.patch b/lib/ffmpeg/patches/0050-Patch-for-memory-leaks-in-DVB-subtitles-decoder.patch
1648 deleted file mode 100644
1649 index 654a514..0000000
1650 --- a/lib/ffmpeg/patches/0050-Patch-for-memory-leaks-in-DVB-subtitles-decoder.patch
1651 +++ /dev/null
1652 @@ -1,25 +0,0 @@
1653 -From 078e7b14d4a44073dddebc6a0a544f648e69a9cb Mon Sep 17 00:00:00 2001
1654 -From: =?UTF-8?q?Jernej=20Fija=C4=8Dko?= <jernej@jernej-ThinkCentre-M91p.(none)>
1655 -Date: Mon, 11 Jul 2011 10:11:04 +0200
1656 -Subject: [PATCH] Patch for memory leaks in DVB subtitles decoder
1657 -
1658 -Signed-off-by: Joakim Plate <elupus@ecce.se>
1659 ----
1660 - lib/ffmpeg/libavcodec/dvbsubdec.c | 1 +
1661 - 1 files changed, 1 insertions(+), 0 deletions(-)
1662 -
1663 -diff --git a/lib/ffmpeg/libavcodec/dvbsubdec.c b/lib/ffmpeg/libavcodec/dvbsubdec.c
1664 -index e68a0b3..7c37915 100644
1665 ---- a/lib/ffmpeg/libavcodec/dvbsubdec.c
1666 -+++ b/lib/ffmpeg/libavcodec/dvbsubdec.c
1667 -@@ -1457,6 +1457,7 @@ static int dvbsub_decode(AVCodecContext *avctx,
1668 - break;
1669 - case DVBSUB_DISPLAYDEFINITION_SEGMENT:
1670 - dvbsub_parse_display_definition_segment(avctx, p, segment_length);
1671 -+ break;
1672 - case DVBSUB_DISPLAY_SEGMENT:
1673 - *data_size = dvbsub_display_end_segment(avctx, p, segment_length, sub);
1674 - break;
1675 ---
1676 -1.7.4.msysgit.0
1677 -
1678 diff --git a/lib/ffmpeg/patches/0058-fixed-seeks-in-mmsh.patch b/lib/ffmpeg/patches/0058-fixed-seeks-in-mmsh.patch
1679 deleted file mode 100644
1680 index c8a630c..0000000
1681 --- a/lib/ffmpeg/patches/0058-fixed-seeks-in-mmsh.patch
1682 +++ /dev/null
1683 @@ -1,124 +0,0 @@
1684 -From 4e8274d070a598e60a953c6aed2dd9f4710cd2b4 Mon Sep 17 00:00:00 2001
1685 -From: spiff <spiff@xbmc.org>
1686 -Date: Tue, 1 Nov 2011 13:14:09 +0100
1687 -Subject: [PATCH] fixed: seeks in mmsh
1688 -
1689 -this backports upstream commits aedb87c57, 86a4e55e6, 8475ec190,
1690 -60fcc19bff (partially), 237bcaa27518, 33789862, 8af4ac5272, 26b64550d6
1691 -
1692 -thanks a million to michael niedermayer for giving this priority!
1693 ----
1694 - lib/ffmpeg/libavformat/mmsh.c | 53 ++++++++++++++++++++++++++++++++++++----
1695 - 1 files changed, 47 insertions(+), 6 deletions(-)
1696 -
1697 -diff --git a/lib/ffmpeg/libavformat/mmsh.c b/lib/ffmpeg/libavformat/mmsh.c
1698 -index 257b973..3ae886f 100644
1699 ---- a/lib/ffmpeg/libavformat/mmsh.c
1700 -+++ b/lib/ffmpeg/libavformat/mmsh.c
1701 -@@ -54,6 +54,7 @@ typedef enum {
1702 -
1703 - typedef struct {
1704 - MMSContext mms;
1705 -+ uint8_t location[1024];
1706 - int request_seq; ///< request packet sequence
1707 - int chunk_seq; ///< data packet sequence
1708 - } MMSHContext;
1709 -@@ -210,10 +211,10 @@ static int get_http_header_data(MMSHContext *mmsh)
1710 - return 0;
1711 - }
1712 -
1713 --static int mmsh_open(URLContext *h, const char *uri, int flags)
1714 -+static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int timestamp, int64_t pos)
1715 - {
1716 - int i, port, err;
1717 -- char httpname[256], path[256], host[128], location[1024];
1718 -+ char httpname[256], path[256], host[128];
1719 - char *stream_selection = NULL;
1720 - char headers[1024];
1721 - MMSHContext *mmsh;
1722 -@@ -224,10 +225,10 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
1723 - return AVERROR(ENOMEM);
1724 - mmsh->request_seq = h->is_streamed = 1;
1725 - mms = &mmsh->mms;
1726 -- av_strlcpy(location, uri, sizeof(location));
1727 -+ av_strlcpy(mmsh->location, uri, sizeof(mmsh->location));
1728 -
1729 - av_url_split(NULL, 0, NULL, 0,
1730 -- host, sizeof(host), &port, path, sizeof(path), location);
1731 -+ host, sizeof(host), &port, path, sizeof(path), mmsh->location);
1732 - if (port<0)
1733 - port = 80; // default mmsh protocol port
1734 - ff_url_join(httpname, sizeof(httpname), "http", NULL, host, port, path);
1735 -@@ -283,8 +284,9 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
1736 - CLIENTGUID
1737 - "Pragma: stream-switch-count=%d\r\n"
1738 - "Pragma: stream-switch-entry=%s\r\n"
1739 -+ "Pragma: no-cache,rate)1.000000,stream-time=%u"
1740 - "Connection: Close\r\n\r\n",
1741 -- host, port, mmsh->request_seq++, mms->stream_num, stream_selection);
1742 -+ host, port, mmsh->request_seq++, mms->stream_num, stream_selection, timestamp);
1743 - av_freep(&stream_selection);
1744 - if (err < 0) {
1745 - av_log(NULL, AV_LOG_ERROR, "Build play request failed!\n");
1746 -@@ -313,6 +315,11 @@ fail:
1747 - return err;
1748 - }
1749 -
1750 -+static int mmsh_open(URLContext *h, const char *uri, int flags)
1751 -+{
1752 -+ return mmsh_open_internal(h, uri, flags, 0, 0);
1753 -+}
1754 -+
1755 - static int handle_chunk_type(MMSHContext *mmsh)
1756 - {
1757 - MMSContext *mms = &mmsh->mms;
1758 -@@ -359,11 +366,45 @@ static int mmsh_read(URLContext *h, uint8_t *buf, int size)
1759 - return res;
1760 - }
1761 -
1762 -+static int64_t mmsh_read_seek(URLContext *h, int stream_index,
1763 -+ int64_t timestamp, int flags)
1764 -+{
1765 -+ MMSHContext *mmsh = h->priv_data;
1766 -+ MMSContext *mms = &mmsh->mms;
1767 -+ int ret;
1768 -+
1769 -+ ret= mmsh_open_internal(h, mmsh->location, 0, FFMAX(timestamp, 0), 0);
1770 -+
1771 -+ if(ret>=0){
1772 -+ if (mms->mms_hd)
1773 -+ url_close(mms->mms_hd);
1774 -+ av_freep(&mms->streams);
1775 -+ av_freep(&mms->asf_header);
1776 -+ av_free(mmsh);
1777 -+ mmsh = h->priv_data;
1778 -+ mms = &mmsh->mms;
1779 -+ mms->asf_header_read_size= mms->asf_header_size;
1780 -+ }else
1781 -+ h->priv_data= mmsh;
1782 -+ return ret;
1783 -+}
1784 -+
1785 -+static int64_t mmsh_seek(URLContext *h, int64_t pos, int whence)
1786 -+{
1787 -+ MMSHContext *mmsh = h->priv_data;
1788 -+ MMSContext *mms = &mmsh->mms;
1789 -+
1790 -+ if(pos == 0 && whence == SEEK_CUR)
1791 -+ return mms->asf_header_read_size + mms->remaining_in_len + mmsh->chunk_seq * mms->asf_packet_len;
1792 -+ return AVERROR(ENOSYS);
1793 -+}
1794 -+
1795 - URLProtocol ff_mmsh_protocol = {
1796 - .name = "mmsh",
1797 - .url_open = mmsh_open,
1798 - .url_read = mmsh_read,
1799 - .url_write = NULL,
1800 -- .url_seek = NULL,
1801 -+ .url_seek = mmsh_seek,
1802 - .url_close = mmsh_close,
1803 -+ .url_read_seek = mmsh_read_seek,
1804 - };
1805 ---
1806 -1.7.5
1807 -
1808 diff --git a/lib/ffmpeg/patches/0059-fix-h264-decode-size.patch b/lib/ffmpeg/patches/0059-fix-h264-decode-size.patch
1809 deleted file mode 100644
1810 index 9328ac6..0000000
1811 --- a/lib/ffmpeg/patches/0059-fix-h264-decode-size.patch
1812 +++ /dev/null
1813 @@ -1,43 +0,0 @@
1814 -backport of upstream commits 23acfcd9 and 29a29226
1815 -
1816 -Slightly modified because of differences between upstream code and ours.
1817 -
1818 ----
1819 -
1820 -diff --git a/lib/ffmpeg/libavcodec/h264.c b/lib/ffmpeg/libavcodec/h264.c
1821 -index 31d43df..47b0073 100644
1822 ---- a/lib/ffmpeg/libavcodec/h264.c
1823 -+++ b/lib/ffmpeg/libavcodec/h264.c
1824 -@@ -1797,15 +1797,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
1825 - s->mb_height= h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag);
1826 -
1827 - h->b_stride= s->mb_width*4;
1828 --
1829 -- s->width = 16*s->mb_width - 2*FFMIN(h->sps.crop_right, 7);
1830 -- if(h->sps.frame_mbs_only_flag)
1831 -- s->height= 16*s->mb_height - 2*FFMIN(h->sps.crop_bottom, 7);
1832 -- else
1833 -- s->height= 16*s->mb_height - 4*FFMIN(h->sps.crop_bottom, 7);
1834 -+ s->width = 16*s->mb_width;
1835 -+ s->height= 16*s->mb_height;
1836 -
1837 - if (s->context_initialized
1838 -- && ( s->width != s->avctx->width || s->height != s->avctx->height
1839 -+ && ( s->width != s->avctx->coded_width || s->height != s->avctx->coded_height
1840 - || av_cmp_q(h->sps.sar, s->avctx->sample_aspect_ratio))) {
1841 - if(h != h0)
1842 - return -1; // width / height changed during parallelized decoding
1843 -@@ -1818,6 +1814,13 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
1844 - return -1; // we cant (re-)initialize context during parallel decoding
1845 -
1846 - avcodec_set_dimensions(s->avctx, s->width, s->height);
1847 -+
1848 -+ s->avctx->width -= 2*FFMIN(h->sps.crop_right, 7);
1849 -+ if(h->sps.frame_mbs_only_flag)
1850 -+ s->avctx->height-=2*FFMIN(h->sps.crop_bottom, 7);
1851 -+ else
1852 -+ s->avctx->height-=4*FFMIN(h->sps.crop_bottom, 7);
1853 -+
1854 - s->avctx->sample_aspect_ratio= h->sps.sar;
1855 - av_assert0(s->avctx->sample_aspect_ratio.den);
1856 -
1857 diff --git a/lib/ffmpeg/patches/0061-fix-vc1-vaapi-intel-sandy-bridge.patch b/lib/ffmpeg/patches/0061-fix-vc1-vaapi-intel-sandy-bridge.patch
1858 deleted file mode 100644
1859 index 8739f41..0000000
1860 --- a/lib/ffmpeg/patches/0061-fix-vc1-vaapi-intel-sandy-bridge.patch
1861 +++ /dev/null
1862 @@ -1,48 +0,0 @@
1863 -This patch backports 53efb758c045900f512c947074900c0dbc988685 and a18e7b4fb77d3799cf21110b5e6dda4691a295b3
1864 -
1865 -Written by Gwenole Beauchesne <gwenole.beauchesne@intel.com>
1866 -and fixes vc1 decoding with vaapi on Intel Sandy Bridge GPUs.
1867 -
1868 -
1869 -diff --git a/lib/ffmpeg/libavcodec/vaapi_vc1.c b/lib/ffmpeg/libavcodec/vaapi_vc1.c
1870 -index c61a5bd..a9bcd7b 100644
1871 ---- a/lib/ffmpeg/libavcodec/vaapi_vc1.c
1872 -+++ b/lib/ffmpeg/libavcodec/vaapi_vc1.c
1873 -@@ -116,6 +116,18 @@ static inline VAMvModeVC1 vc1_get_MVMODE2(VC1Context *v)
1874 - return 0;
1875 - }
1876 -
1877 -+/** Reconstruct bitstream TTFRM (7.1.1.41, Table-53) */
1878 -+static inline int vc1_get_TTFRM(VC1Context *v)
1879 -+{
1880 -+ switch (v->ttfrm) {
1881 -+ case TT_8X8: return 0;
1882 -+ case TT_8X4: return 1;
1883 -+ case TT_4X8: return 2;
1884 -+ case TT_4X4: return 3;
1885 -+ }
1886 -+ return 0;
1887 -+}
1888 -+
1889 - /** Pack FFmpeg bitplanes into a VABitPlaneBuffer element */
1890 - static inline void vc1_pack_bitplanes(uint8_t *bitplane, int n, const uint8_t *ff_bp[3], int x, int y, int stride)
1891 - {
1892 -@@ -160,6 +172,9 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
1893 - pic_param->sequence_fields.bits.syncmarker = s->resync_marker;
1894 - pic_param->sequence_fields.bits.rangered = v->rangered;
1895 - pic_param->sequence_fields.bits.max_b_frames = s->avctx->max_b_frames;
1896 -+#if VA_CHECK_VERSION(0,32,0)
1897 -+ pic_param->sequence_fields.bits.profile = v->profile;
1898 -+#endif
1899 - pic_param->coded_width = s->avctx->coded_width;
1900 - pic_param->coded_height = s->avctx->coded_height;
1901 - pic_param->entrypoint_fields.value = 0; /* reset all bits */
1902 -@@ -236,7 +251,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
1903 - pic_param->transform_fields.value = 0; /* reset all bits */
1904 - pic_param->transform_fields.bits.variable_sized_transform_flag = v->vstransform;
1905 - pic_param->transform_fields.bits.mb_level_transform_type_flag = v->ttmbf;
1906 -- pic_param->transform_fields.bits.frame_level_transform_type = v->ttfrm;
1907 -+ pic_param->transform_fields.bits.frame_level_transform_type = vc1_get_TTFRM(v);
1908 - pic_param->transform_fields.bits.transform_ac_codingset_idx1 = v->c_ac_table_index;
1909 - pic_param->transform_fields.bits.transform_ac_codingset_idx2 = v->y_ac_table_index;
1910 - pic_param->transform_fields.bits.intra_transform_dc_table = v->s.dc_table_index;
1911 diff --git a/lib/ffmpeg/patches/0062-fixed-crash-in-ffmpeg-matroskadec-with-some-files-fi.patch b/lib/ffmpeg/patches/0062-fixed-crash-in-ffmpeg-matroskadec-with-some-files-fi.patch
1912 deleted file mode 100644
1913 index 00260c7..0000000
1914 --- a/lib/ffmpeg/patches/0062-fixed-crash-in-ffmpeg-matroskadec-with-some-files-fi.patch
1915 +++ /dev/null
1916 @@ -1,50 +0,0 @@
1917 -From e138f82d2b066a47262ce0f06df106665761ac43 Mon Sep 17 00:00:00 2001
1918 -From: Anssi Hannula <anssi@xbmc.org>
1919 -Date: Wed, 7 Mar 2012 15:08:41 +0200
1920 -Subject: [PATCH] fixed: crash in ffmpeg matroskadec with some files (fixes
1921 - #12741)
1922 -
1923 -Backport 2851b1f6566580485dceb67cbb6b93f64ee9a9bd from upstream FFmpeg,
1924 -it fixes a rare matroskadec crash:
1925 -
1926 -matroskadec: check that pointers were initialized before accessing them
1927 -
1928 -fix ticket #14
1929 -
1930 -Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
1931 ----
1932 - lib/ffmpeg/libavformat/matroskadec.c | 8 +++++---
1933 - 1 files changed, 5 insertions(+), 3 deletions(-)
1934 -
1935 -diff --git a/lib/ffmpeg/libavformat/matroskadec.c b/lib/ffmpeg/libavformat/matroskadec.c
1936 -index 14b96d4..70489e8 100644
1937 ---- a/lib/ffmpeg/libavformat/matroskadec.c
1938 -+++ b/lib/ffmpeg/libavformat/matroskadec.c
1939 -@@ -1066,19 +1066,21 @@ static void matroska_convert_tags(AVFormatContext *s)
1940 - if (tags[i].target.attachuid) {
1941 - MatroskaAttachement *attachment = matroska->attachments.elem;
1942 - for (j=0; j<matroska->attachments.nb_elem; j++)
1943 -- if (attachment[j].uid == tags[i].target.attachuid)
1944 -+ if (attachment[j].uid == tags[i].target.attachuid
1945 -+ && attachment[j].stream)
1946 - matroska_convert_tag(s, &tags[i].tag,
1947 - &attachment[j].stream->metadata, NULL);
1948 - } else if (tags[i].target.chapteruid) {
1949 - MatroskaChapter *chapter = matroska->chapters.elem;
1950 - for (j=0; j<matroska->chapters.nb_elem; j++)
1951 -- if (chapter[j].uid == tags[i].target.chapteruid)
1952 -+ if (chapter[j].uid == tags[i].target.chapteruid
1953 -+ && chapter[j].chapter)
1954 - matroska_convert_tag(s, &tags[i].tag,
1955 - &chapter[j].chapter->metadata, NULL);
1956 - } else if (tags[i].target.trackuid) {
1957 - MatroskaTrack *track = matroska->tracks.elem;
1958 - for (j=0; j<matroska->tracks.nb_elem; j++)
1959 -- if (track[j].uid == tags[i].target.trackuid)
1960 -+ if (track[j].uid == tags[i].target.trackuid && track[j].stream)
1961 - matroska_convert_tag(s, &tags[i].tag,
1962 - &track[j].stream->metadata, NULL);
1963 - } else {
1964 ---
1965 -1.7.7.2
1966 -
1967 diff --git a/lib/ffmpeg/patches/0065-changed-allow-yadif-deinterlacer-to-enable-and-disab.patch b/lib/ffmpeg/patches/0065-changed-allow-yadif-deinterlacer-to-enable-and-disab.patch
1968 deleted file mode 100644
1969 index 30b27f4..0000000
1970 --- a/lib/ffmpeg/patches/0065-changed-allow-yadif-deinterlacer-to-enable-and-disab.patch
1971 +++ /dev/null
1972 @@ -1,106 +0,0 @@
1973 -From c174f74181bcfa169aa8284f9524cd9db0f4cdda Mon Sep 17 00:00:00 2001
1974 -From: elupus <elupus@xbmc.org>
1975 -Date: Fri, 24 Jun 2011 01:23:48 +0200
1976 -Subject: [PATCH] changed: allow yadif deinterlacer to enable and disable
1977 - based on input interlaced flag
1978 -
1979 ----
1980 - lib/ffmpeg/libavfilter/vf_yadif.c | 34 ++++++++++++++++++--
1981 - .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 4 ++
1982 - 2 files changed, 35 insertions(+), 3 deletions(-)
1983 -
1984 -diff --git a/lib/ffmpeg/libavfilter/vf_yadif.c b/lib/ffmpeg/libavfilter/vf_yadif.c
1985 -index bd0a9de..28b1d3e 100644
1986 ---- a/lib/ffmpeg/libavfilter/vf_yadif.c
1987 -+++ b/lib/ffmpeg/libavfilter/vf_yadif.c
1988 -@@ -43,6 +43,13 @@ typedef struct {
1989 - int parity;
1990 -
1991 - int frame_pending;
1992 -+ int skip;
1993 -+
1994 -+ /**
1995 -+ * 0: deinterlace all frames
1996 -+ * 1: only deinterlace frames marked as interlaced
1997 -+ */
1998 -+ int auto_enable;
1999 -
2000 - AVFilterBufferRef *cur;
2001 - AVFilterBufferRef *next;
2002 -@@ -212,10 +219,21 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
2003 - yadif->prev = yadif->cur;
2004 - yadif->cur = yadif->next;
2005 - yadif->next = picref;
2006 -+ yadif->skip = 0;
2007 -
2008 - if (!yadif->cur)
2009 - return;
2010 -
2011 -+ if (yadif->auto_enable && !yadif->cur->video->interlaced) {
2012 -+ yadif->out = yadif->cur;
2013 -+ avfilter_unref_buffer(yadif->prev);
2014 -+ yadif->cur = NULL;
2015 -+ yadif->prev = NULL;
2016 -+ yadif->skip = 1;
2017 -+ avfilter_start_frame(ctx->outputs[0], yadif->out);
2018 -+ return;
2019 -+ }
2020 -+
2021 - if (!yadif->prev)
2022 - yadif->prev = avfilter_ref_buffer(yadif->cur, AV_PERM_READ);
2023 -
2024 -@@ -232,6 +250,12 @@ static void end_frame(AVFilterLink *link)
2025 - AVFilterContext *ctx = link->dst;
2026 - YADIFContext *yadif = ctx->priv;
2027 -
2028 -+ if (yadif->skip) {
2029 -+ avfilter_draw_slice(ctx->outputs[0], 0, link->h, 1);
2030 -+ avfilter_end_frame(ctx->outputs[0]);
2031 -+ return;
2032 -+ }
2033 -+
2034 - if (!yadif->out)
2035 - return;
2036 -
2037 -@@ -253,7 +277,7 @@ static int request_frame(AVFilterLink *link)
2038 -
2039 - if ((ret = avfilter_request_frame(link->src->inputs[0])))
2040 - return ret;
2041 -- } while (!yadif->cur);
2042 -+ } while (!yadif->out);
2043 -
2044 - return 0;
2045 - }
2046 -@@ -275,6 +299,9 @@ static int poll_frame(AVFilterLink *link)
2047 - }
2048 - assert(yadif->next);
2049 -
2050 -+ if (yadif->skip)
2051 -+ return val;
2052 -+
2053 - return val * ((yadif->mode&1)+1);
2054 - }
2055 -
2056 -@@ -307,8 +334,9 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
2057 -
2058 - yadif->mode = 0;
2059 - yadif->parity = -1;
2060 -+ yadif->auto_enable = 0;
2061 -
2062 -- if (args) sscanf(args, "%d:%d", &yadif->mode, &yadif->parity);
2063 -+ if (args) sscanf(args, "%d:%d:%d", &yadif->mode, &yadif->parity, &yadif->auto_enable);
2064 -
2065 - yadif->filter_line = filter_line_c;
2066 - if (HAVE_SSSE3 && cpu_flags & AV_CPU_FLAG_SSSE3)
2067 -@@ -318,7 +346,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
2068 - else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX)
2069 - yadif->filter_line = ff_yadif_filter_line_mmx;
2070 -
2071 -- av_log(ctx, AV_LOG_INFO, "mode:%d parity:%d\n", yadif->mode, yadif->parity);
2072 -+ av_log(ctx, AV_LOG_INFO, "mode:%d parity:%d auto_enable:%d\n", yadif->mode, yadif->parity, yadif->auto_enable);
2073 -
2074 - return 0;
2075 - }
2076 ---
2077 -1.7.7.2
2078 -
2079 diff --git a/lib/ffmpeg/patches/0066-changed-updated-yadif-patch-to-same-as-will-be-appli.patch b/lib/ffmpeg/patches/0066-changed-updated-yadif-patch-to-same-as-will-be-appli.patch
2080 deleted file mode 100644
2081 index e5c3113..0000000
2082 --- a/lib/ffmpeg/patches/0066-changed-updated-yadif-patch-to-same-as-will-be-appli.patch
2083 +++ /dev/null
2084 @@ -1,82 +0,0 @@
2085 -From 91efb0af6f80d82b104a810a1ccdc0ae6702d022 Mon Sep 17 00:00:00 2001
2086 -From: elupus <elupus@xbmc.org>
2087 -Date: Sun, 3 Jul 2011 17:06:42 +0200
2088 -Subject: [PATCH] changed: updated yadif patch to same as will be applied
2089 - upstream
2090 -
2091 ----
2092 - lib/ffmpeg/libavfilter/vf_yadif.c | 18 +++++++-----------
2093 - 1 files changed, 7 insertions(+), 11 deletions(-)
2094 -
2095 -diff --git a/lib/ffmpeg/libavfilter/vf_yadif.c b/lib/ffmpeg/libavfilter/vf_yadif.c
2096 -index 28b1d3e..d7bed90 100644
2097 ---- a/lib/ffmpeg/libavfilter/vf_yadif.c
2098 -+++ b/lib/ffmpeg/libavfilter/vf_yadif.c
2099 -@@ -43,7 +43,6 @@ typedef struct {
2100 - int parity;
2101 -
2102 - int frame_pending;
2103 -- int skip;
2104 -
2105 - /**
2106 - * 0: deinterlace all frames
2107 -@@ -219,17 +218,14 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
2108 - yadif->prev = yadif->cur;
2109 - yadif->cur = yadif->next;
2110 - yadif->next = picref;
2111 -- yadif->skip = 0;
2112 -
2113 - if (!yadif->cur)
2114 - return;
2115 -
2116 - if (yadif->auto_enable && !yadif->cur->video->interlaced) {
2117 -- yadif->out = yadif->cur;
2118 -+ yadif->out = avfilter_ref_buffer(yadif->cur, AV_PERM_READ);
2119 - avfilter_unref_buffer(yadif->prev);
2120 -- yadif->cur = NULL;
2121 - yadif->prev = NULL;
2122 -- yadif->skip = 1;
2123 - avfilter_start_frame(ctx->outputs[0], yadif->out);
2124 - return;
2125 - }
2126 -@@ -250,15 +246,15 @@ static void end_frame(AVFilterLink *link)
2127 - AVFilterContext *ctx = link->dst;
2128 - YADIFContext *yadif = ctx->priv;
2129 -
2130 -- if (yadif->skip) {
2131 -+ if (!yadif->out)
2132 -+ return;
2133 -+
2134 -+ if (yadif->auto_enable && !yadif->cur->video->interlaced) {
2135 - avfilter_draw_slice(ctx->outputs[0], 0, link->h, 1);
2136 - avfilter_end_frame(ctx->outputs[0]);
2137 - return;
2138 - }
2139 -
2140 -- if (!yadif->out)
2141 -- return;
2142 --
2143 - return_frame(ctx, 0);
2144 - }
2145 -
2146 -@@ -277,7 +273,7 @@ static int request_frame(AVFilterLink *link)
2147 -
2148 - if ((ret = avfilter_request_frame(link->src->inputs[0])))
2149 - return ret;
2150 -- } while (!yadif->out);
2151 -+ } while (!yadif->cur);
2152 -
2153 - return 0;
2154 - }
2155 -@@ -299,7 +295,7 @@ static int poll_frame(AVFilterLink *link)
2156 - }
2157 - assert(yadif->next);
2158 -
2159 -- if (yadif->skip)
2160 -+ if (yadif->auto_enable && yadif->next && !yadif->next->video->interlaced)
2161 - return val;
2162 -
2163 - return val * ((yadif->mode&1)+1);
2164 ---
2165 -1.7.7.2
2166 -
2167 diff --git a/lib/ffmpeg/patches/0067-changed-updated-dxva-zigzag-workaround-for-ATI-based.patch b/lib/ffmpeg/patches/0067-changed-updated-dxva-zigzag-workaround-for-ATI-based.patch
2168 deleted file mode 100644
2169 index 8854f7a..0000000
2170 --- a/lib/ffmpeg/patches/0067-changed-updated-dxva-zigzag-workaround-for-ATI-based.patch
2171 +++ /dev/null
2172 @@ -1,92 +0,0 @@
2173 -From 321c5e668f2c213a33cef6c7c9fe11ee2850665f Mon Sep 17 00:00:00 2001
2174 -From: elupus <elupus@xbmc.org>
2175 -Date: Tue, 5 Jul 2011 00:14:52 +0200
2176 -Subject: [PATCH] changed: updated dxva zigzag workaround for ATI based on
2177 - comments on xbmc.org and ffmpeg.org
2178 -
2179 ----
2180 - lib/ffmpeg/libavcodec/avcodec.h | 1 -
2181 - lib/ffmpeg/libavcodec/dxva2.h | 2 ++
2182 - lib/ffmpeg/libavcodec/dxva2_h264.c | 23 +++++++++++++----------
2183 - xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp | 14 +++-----------
2184 - 4 files changed, 18 insertions(+), 22 deletions(-)
2185 -
2186 -diff --git a/lib/ffmpeg/libavcodec/avcodec.h b/lib/ffmpeg/libavcodec/avcodec.h
2187 -index cb96c6f..4745980 100644
2188 ---- a/lib/ffmpeg/libavcodec/avcodec.h
2189 -+++ b/lib/ffmpeg/libavcodec/avcodec.h
2190 -@@ -1429,7 +1429,6 @@ typedef struct AVCodecContext {
2191 - #define FF_BUG_DC_CLIP 4096
2192 - #define FF_BUG_MS 8192 ///< Work around various bugs in Microsoft's broken decoders.
2193 - #define FF_BUG_TRUNCATED 16384
2194 --#define FF_BUG_DXVA2_SCALING_LIST_ZIGZAG 32768 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
2195 - //#define FF_BUG_FAKE_SCALABILITY 16 //Autodetection should work 100%.
2196 -
2197 - /**
2198 -diff --git a/lib/ffmpeg/libavcodec/dxva2.h b/lib/ffmpeg/libavcodec/dxva2.h
2199 -index 5c5fe21..6eb494b 100644
2200 ---- a/lib/ffmpeg/libavcodec/dxva2.h
2201 -+++ b/lib/ffmpeg/libavcodec/dxva2.h
2202 -@@ -27,6 +27,8 @@
2203 -
2204 - #include <dxva2api.h>
2205 -
2206 -+#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
2207 -+
2208 - /**
2209 - * This structure is used to provides the necessary configurations and data
2210 - * to the DXVA2 FFmpeg HWAccel implementation.
2211 -diff --git a/lib/ffmpeg/libavcodec/dxva2_h264.c b/lib/ffmpeg/libavcodec/dxva2_h264.c
2212 -index 7b81c8e..4e3370c 100644
2213 ---- a/lib/ffmpeg/libavcodec/dxva2_h264.c
2214 -+++ b/lib/ffmpeg/libavcodec/dxva2_h264.c
2215 -@@ -113,6 +113,9 @@ static void fill_picture_parameters(struct dxva_context *ctx, const H264Context
2216 -
2217 - pp->bit_depth_luma_minus8 = h->sps.bit_depth_luma - 8;
2218 - pp->bit_depth_chroma_minus8 = h->sps.bit_depth_chroma - 8;
2219 -+ if (ctx->workaround & FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG)
2220 -+ pp->Reserved16Bits = 0;
2221 -+ else
2222 - pp->Reserved16Bits = 3; /* FIXME is there a way to detect the right mode ? */
2223 - pp->StatusReportFeedbackNumber = 1 + ctx->report_id++;
2224 - pp->CurrFieldOrderCnt[0] = 0;
2225 -@@ -150,18 +153,18 @@ static void fill_picture_parameters(struct dxva_context *ctx, const H264Context
2226 - //pp->SliceGroupMap[810]; /* XXX not implemented by FFmpeg */
2227 - }
2228 -
2229 --static void fill_scaling_lists(AVCodecContext *avctx, const H264Context *h, DXVA_Qmatrix_H264 *qm)
2230 -+static void fill_scaling_lists(struct dxva_context *ctx, const H264Context *h, DXVA_Qmatrix_H264 *qm)
2231 - {
2232 - unsigned i, j;
2233 - memset(qm, 0, sizeof(*qm));
2234 -- if (avctx->workaround_bugs & FF_BUG_DXVA2_SCALING_LIST_ZIGZAG) { // For old UVD/UVD+ ATI cards
2235 -- for (i = 0; i < 6; i++)
2236 -- for (j = 0; j < 16; j++)
2237 -- qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][j];
2238 --
2239 -- for (i = 0; i < 2; i++)
2240 -- for (j = 0; j < 64; j++)
2241 -- qm->bScalingLists8x8[i][j] = h->pps.scaling_matrix8[i][j];
2242 -+ if (ctx->workaround & FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG) {
2243 -+ for (i = 0; i < 6; i++)
2244 -+ for (j = 0; j < 16; j++)
2245 -+ qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][j];
2246 -+
2247 -+ for (i = 0; i < 2; i++)
2248 -+ for (j = 0; j < 64; j++)
2249 -+ qm->bScalingLists8x8[i][j] = h->pps.scaling_matrix8[i][j];
2250 - } else {
2251 - for (i = 0; i < 6; i++)
2252 - for (j = 0; j < 16; j++)
2253 -@@ -380,7 +383,7 @@ static int start_frame(AVCodecContext *avctx,
2254 - fill_picture_parameters(ctx, h, &ctx_pic->pp);
2255 -
2256 - /* Fill up DXVA_Qmatrix_H264 */
2257 -- fill_scaling_lists(avctx, h, &ctx_pic->qm);
2258 -+ fill_scaling_lists(ctx, h, &ctx_pic->qm);
2259 -
2260 - ctx_pic->slice_count = 0;
2261 - ctx_pic->bitstream_size = 0;
2262 ---
2263 -1.7.7.2
2264 -
2265 diff --git a/lib/ffmpeg/patches/0068-fixed-yadif-should-copy-frame-properties-of-second-f.patch b/lib/ffmpeg/patches/0068-fixed-yadif-should-copy-frame-properties-of-second-f.patch
2266 deleted file mode 100644
2267 index a5b3a7c..0000000
2268 --- a/lib/ffmpeg/patches/0068-fixed-yadif-should-copy-frame-properties-of-second-f.patch
2269 +++ /dev/null
2270 @@ -1,31 +0,0 @@
2271 -From 793f3e0bfcaadaccd0b5db2a37a60da42a6b207e Mon Sep 17 00:00:00 2001
2272 -From: elupus <elupus@xbmc.org>
2273 -Date: Thu, 14 Jul 2011 22:07:22 +0200
2274 -Subject: [PATCH] fixed: yadif should copy frame properties of second frame as
2275 - well
2276 -
2277 ----
2278 - lib/ffmpeg/libavfilter/vf_yadif.c | 5 ++++-
2279 - 1 files changed, 4 insertions(+), 1 deletions(-)
2280 -
2281 -diff --git a/lib/ffmpeg/libavfilter/vf_yadif.c b/lib/ffmpeg/libavfilter/vf_yadif.c
2282 -index d7bed90..da91600 100644
2283 ---- a/lib/ffmpeg/libavfilter/vf_yadif.c
2284 -+++ b/lib/ffmpeg/libavfilter/vf_yadif.c
2285 -@@ -182,9 +182,12 @@ static void return_frame(AVFilterContext *ctx, int is_second)
2286 - tff = yadif->parity^1;
2287 - }
2288 -
2289 -- if (is_second)
2290 -+ if (is_second) {
2291 - yadif->out = avfilter_get_video_buffer(link, AV_PERM_WRITE | AV_PERM_PRESERVE |
2292 - AV_PERM_REUSE, link->w, link->h);
2293 -+ avfilter_copy_buffer_ref_props(yadif->out, yadif->cur);
2294 -+ yadif->out->video->interlaced = 0;
2295 -+ }
2296 -
2297 - filter(ctx, yadif->out, tff ^ !is_second, tff);
2298 -
2299 ---
2300 -1.7.7.2
2301 -
2302 diff --git a/lib/ffmpeg/patches/0070-matroskadec-use-correct-compression-parameters-for-c.patch b/lib/ffmpeg/patches/0070-matroskadec-use-correct-compression-parameters-for-c.patch
2303 deleted file mode 100644
2304 index 6042ffa..0000000
2305 --- a/lib/ffmpeg/patches/0070-matroskadec-use-correct-compression-parameters-for-c.patch
2306 +++ /dev/null
2307 @@ -1,33 +0,0 @@
2308 -From 8efe4d01dcd2f89ad012b8f1dd71192e09fa3e82 Mon Sep 17 00:00:00 2001
2309 -From: CrystalP <CrystalP@xbmc.org>
2310 -Date: Sun, 16 Oct 2011 03:16:26 -0400
2311 -Subject: [PATCH] matroskadec: use correct compression parameters for current
2312 - track CodecPrivate
2313 -
2314 -backport of ffmpeg dc6c36ce46d4c4d7cb63503afc2ee44f00bf3725 on 2011-08-17
2315 -
2316 -fixes a bitmap sub color problem exposed by mkclean --optimize foo.mkv.
2317 -The compressed private data could not be extracted, resulting in a bad color
2318 -palette and wrong colors on screen.
2319 -
2320 -problem described in forum thread http://forum.xbmc.org/showthread.php?t=108942
2321 ----
2322 - lib/ffmpeg/libavformat/matroskadec.c | 2 +-
2323 - 1 files changed, 1 insertions(+), 1 deletions(-)
2324 -
2325 -diff --git a/lib/ffmpeg/libavformat/matroskadec.c b/lib/ffmpeg/libavformat/matroskadec.c
2326 -index 1a87f4a..14b96d4 100644
2327 ---- a/lib/ffmpeg/libavformat/matroskadec.c
2328 -+++ b/lib/ffmpeg/libavformat/matroskadec.c
2329 -@@ -1220,7 +1220,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
2330 - for (i=0; i < matroska->tracks.nb_elem; i++) {
2331 - MatroskaTrack *track = &tracks[i];
2332 - enum CodecID codec_id = CODEC_ID_NONE;
2333 -- EbmlList *encodings_list = &tracks->encodings;
2334 -+ EbmlList *encodings_list = &track->encodings;
2335 - MatroskaTrackEncoding *encodings = encodings_list->elem;
2336 - uint8_t *extradata = NULL;
2337 - int extradata_size = 0;
2338 ---
2339 -1.7.7.2
2340 -
2341 diff --git a/lib/ffmpeg/patches/0071-fixed-Typo.patch b/lib/ffmpeg/patches/0071-fixed-Typo.patch
2342 deleted file mode 100644
2343 index dcb5eda..0000000
2344 --- a/lib/ffmpeg/patches/0071-fixed-Typo.patch
2345 +++ /dev/null
2346 @@ -1,25 +0,0 @@
2347 -From dc0509f7a6341a72ca4399fee37e30c91fddc222 Mon Sep 17 00:00:00 2001
2348 -From: arnova <nospam@void.org>
2349 -Date: Tue, 8 Nov 2011 08:35:59 +0100
2350 -Subject: [PATCH] fixed: Typo
2351 -
2352 ----
2353 - lib/ffmpeg/libavformat/mmsh.c | 2 +-
2354 - 1 files changed, 1 insertions(+), 1 deletions(-)
2355 -
2356 -diff --git a/lib/ffmpeg/libavformat/mmsh.c b/lib/ffmpeg/libavformat/mmsh.c
2357 -index 3ae886f..cc6efa3 100644
2358 ---- a/lib/ffmpeg/libavformat/mmsh.c
2359 -+++ b/lib/ffmpeg/libavformat/mmsh.c
2360 -@@ -284,7 +284,7 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim
2361 - CLIENTGUID
2362 - "Pragma: stream-switch-count=%d\r\n"
2363 - "Pragma: stream-switch-entry=%s\r\n"
2364 -- "Pragma: no-cache,rate)1.000000,stream-time=%u"
2365 -+ "Pragma: no-cache,rate=1.000000,stream-time=%u"
2366 - "Connection: Close\r\n\r\n",
2367 - host, port, mmsh->request_seq++, mms->stream_num, stream_selection, timestamp);
2368 - av_freep(&stream_selection);
2369 ---
2370 -1.7.7.2
2371 -
2372 diff --git a/lib/ffmpeg/patches/0072-h264-Use-mismatching-frame-numbers-in-fields-to-sync.patch b/lib/ffmpeg/patches/0072-h264-Use-mismatching-frame-numbers-in-fields-to-sync.patch
2373 deleted file mode 100644
2374 index a05dfff..0000000
2375 --- a/lib/ffmpeg/patches/0072-h264-Use-mismatching-frame-numbers-in-fields-to-sync.patch
2376 +++ /dev/null
2377 @@ -1,33 +0,0 @@
2378 -From 2ac62404c2f833d5aa64947819538ac354966ef0 Mon Sep 17 00:00:00 2001
2379 -From: Michael Niedermayer <michaelni@gmx.at>
2380 -Date: Sat, 12 Nov 2011 21:10:15 +0100
2381 -Subject: [PATCH] h264: Use mismatching frame numbers in fields to synchronize
2382 - the first/second field state independant of them being
2383 - reference or not. Fixes Ticket354
2384 -
2385 -Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2386 ----
2387 - lib/ffmpeg/libavcodec/h264.c | 6 ++----
2388 - 1 files changed, 2 insertions(+), 4 deletions(-)
2389 -
2390 -diff --git a/lib/ffmpeg/libavcodec/h264.c b/lib/ffmpeg/libavcodec/h264.c
2391 -index 47b0073..87ec292 100644
2392 ---- a/lib/ffmpeg/libavcodec/h264.c
2393 -+++ b/lib/ffmpeg/libavcodec/h264.c
2394 -@@ -1936,11 +1936,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
2395 - s0->first_field = FIELD_PICTURE;
2396 -
2397 - } else {
2398 -- if (h->nal_ref_idc &&
2399 -- s0->current_picture_ptr->reference &&
2400 -- s0->current_picture_ptr->frame_num != h->frame_num) {
2401 -+ if (s0->current_picture_ptr->frame_num != h->frame_num) {
2402 - /*
2403 -- * This and previous field were reference, but had
2404 -+ * This and previous field had
2405 - * different frame_nums. Consider this field first in
2406 - * pair. Throw away previous field except for reference
2407 - * purposes.
2408 ---
2409 -1.7.7.2
2410 -
2411 diff --git a/lib/ffmpeg/patches/0073-Don-t-fill-in-frame-gaps-with-copied-refs-after-flus.patch b/lib/ffmpeg/patches/0073-Don-t-fill-in-frame-gaps-with-copied-refs-after-flus.patch
2412 deleted file mode 100644
2413 index d919336..0000000
2414 --- a/lib/ffmpeg/patches/0073-Don-t-fill-in-frame-gaps-with-copied-refs-after-flus.patch
2415 +++ /dev/null
2416 @@ -1,36 +0,0 @@
2417 -From 46d99a89aa16db1981441bf7103a30e7d28e5e26 Mon Sep 17 00:00:00 2001
2418 -From: Joakim Plate <elupus@ecce.se>
2419 -Date: Fri, 18 Nov 2011 20:36:13 +0100
2420 -Subject: [PATCH] Don't fill in frame gaps with copied refs after flush
2421 -
2422 -The filled in refs cause corruptions in the video frame
2423 -for a long time after it should have recovered.
2424 ----
2425 - lib/ffmpeg/libavcodec/h264.c | 4 ++--
2426 - 1 files changed, 2 insertions(+), 2 deletions(-)
2427 -
2428 -diff --git a/lib/ffmpeg/libavcodec/h264.c b/lib/ffmpeg/libavcodec/h264.c
2429 -index 87ec292..0e002ce 100644
2430 ---- a/lib/ffmpeg/libavcodec/h264.c
2431 -+++ b/lib/ffmpeg/libavcodec/h264.c
2432 -@@ -1464,7 +1464,7 @@ static void implicit_weight_table(H264Context *h, int field){
2433 - */
2434 - static void idr(H264Context *h){
2435 - ff_h264_remove_all_refs(h);
2436 -- h->prev_frame_num= 0;
2437 -+ h->prev_frame_num= -1;
2438 - h->prev_frame_num_offset= 0;
2439 - h->prev_poc_msb=
2440 - h->prev_poc_lsb= 0;
2441 -@@ -1892,7 +1892,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
2442 - h->mb_field_decoding_flag= s->picture_structure != PICT_FRAME;
2443 -
2444 - if(h0->current_slice == 0){
2445 -- while(h->frame_num != h->prev_frame_num &&
2446 -+ while(h->frame_num != h->prev_frame_num && h->prev_frame_num >= 0 &&
2447 - h->frame_num != (h->prev_frame_num+1)%(1<<h->sps.log2_max_frame_num)){
2448 - Picture *prev = h->short_ref_count ? h->short_ref[0] : NULL;
2449 - av_log(h->s.avctx, AV_LOG_DEBUG, "Frame num gap %d %d\n", h->frame_num, h->prev_frame_num);
2450 ---
2451 -1.7.7.2
2452 -
2453 diff --git a/lib/ffmpeg/patches/0074-vaapi-do-not-assert-on-value-read-from-input-bitstre.patch b/lib/ffmpeg/patches/0074-vaapi-do-not-assert-on-value-read-from-input-bitstre.patch
2454 deleted file mode 100644
2455 index d7b2285..0000000
2456 --- a/lib/ffmpeg/patches/0074-vaapi-do-not-assert-on-value-read-from-input-bitstre.patch
2457 +++ /dev/null
2458 @@ -1,41 +0,0 @@
2459 -From 425b9a373384813d2fe513d42b1d585ecbea6ca5 Mon Sep 17 00:00:00 2001
2460 -From: Diego Biurrun <diego@biurrun.de>
2461 -Date: Fri, 15 Jul 2011 01:06:16 +0200
2462 -Subject: [PATCH] vaapi: do not assert on value read from input bitstream
2463 -
2464 -User-provided data should never trigger an assert; return error instead.
2465 -Also fix an instance of get_bits where get_bits_long should have been used.
2466 -
2467 -This eliminates the following warning:
2468 -libavcodec/vaapi_mpeg2.c:112:14: warning: variable 'start_code' set but not used
2469 -
2470 -Signed-off-by: elupus <elupus@xbmc.org>
2471 ----
2472 - lib/ffmpeg/libavcodec/vaapi_mpeg2.c | 6 +++---
2473 - 1 files changed, 3 insertions(+), 3 deletions(-)
2474 -
2475 -diff --git a/lib/ffmpeg/libavcodec/vaapi_mpeg2.c b/lib/ffmpeg/libavcodec/vaapi_mpeg2.c
2476 -index 17d82b7..8d456ba 100644
2477 ---- a/lib/ffmpeg/libavcodec/vaapi_mpeg2.c
2478 -+++ b/lib/ffmpeg/libavcodec/vaapi_mpeg2.c
2479 -@@ -109,14 +109,14 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
2480 - MpegEncContext * const s = avctx->priv_data;
2481 - VASliceParameterBufferMPEG2 *slice_param;
2482 - GetBitContext gb;
2483 -- uint32_t start_code, quantiser_scale_code, intra_slice_flag, macroblock_offset;
2484 -+ uint32_t quantiser_scale_code, intra_slice_flag, macroblock_offset;
2485 -
2486 - av_dlog(avctx, "vaapi_mpeg2_decode_slice(): buffer %p, size %d\n", buffer, size);
2487 -
2488 - /* Determine macroblock_offset */
2489 - init_get_bits(&gb, buffer, 8 * size);
2490 -- start_code = get_bits(&gb, 32);
2491 -- assert((start_code & 0xffffff00) == 0x00000100);
2492 -+ if (get_bits_long(&gb, 32) >> 8 != 1) /* start code */
2493 -+ return AVERROR_INVALIDDATA;
2494 - quantiser_scale_code = get_bits(&gb, 5);
2495 - intra_slice_flag = get_bits1(&gb);
2496 - if (intra_slice_flag) {
2497 ---
2498 -1.7.7.2
2499 -
2500 diff --git a/lib/ffmpeg/patches/0075-fixed-playback-from-mmst-urls-would-halt-after-some-.patch b/lib/ffmpeg/patches/0075-fixed-playback-from-mmst-urls-would-halt-after-some-.patch
2501 deleted file mode 100644
2502 index cd5412b..0000000
2503 --- a/lib/ffmpeg/patches/0075-fixed-playback-from-mmst-urls-would-halt-after-some-.patch
2504 +++ /dev/null
2505 @@ -1,30 +0,0 @@
2506 -From 919a875b4bc4ea2a8ddc0aab98ea74c6475f9525 Mon Sep 17 00:00:00 2001
2507 -From: spiff <spiff@xbmc.org>
2508 -Date: Tue, 17 Jan 2012 22:47:36 +0100
2509 -Subject: [PATCH] fixed: playback from mmst:// urls would halt after some
2510 - time.
2511 -
2512 -this backports upstream 275189a2bd71cf49d66374c44d3de2262d323460
2513 -
2514 -thanks to johoja for doing the ground work
2515 ----
2516 - lib/ffmpeg/libavformat/mmst.c | 3 +--
2517 - 1 files changed, 1 insertions(+), 2 deletions(-)
2518 -
2519 -diff --git a/lib/ffmpeg/libavformat/mmst.c b/lib/ffmpeg/libavformat/mmst.c
2520 -index 8464d3b..385f017 100644
2521 ---- a/lib/ffmpeg/libavformat/mmst.c
2522 -+++ b/lib/ffmpeg/libavformat/mmst.c
2523 -@@ -290,8 +290,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst)
2524 - return read_result < 0 ? read_result : AVERROR_IO;
2525 - }
2526 - packet_type= AV_RL16(mms->in_buffer+36);
2527 -- hr = AV_RL32(mms->in_buffer + 40);
2528 -- if (hr) {
2529 -+ if (read_result >= 44 && (hr = AV_RL32(mms->in_buffer + 40))) {
2530 - av_log(NULL, AV_LOG_ERROR,
2531 - "Server sent an error status code: 0x%08x\n", hr);
2532 - return AVERROR_UNKNOWN;
2533 ---
2534 -1.7.7.2
2535 -
2536 diff --git a/lib/ffmpeg/patches/0077-Change-yadif-to-not-use-out-of-picture-lines.-Fixes-.patch b/lib/ffmpeg/patches/0077-Change-yadif-to-not-use-out-of-picture-lines.-Fixes-.patch
2537 deleted file mode 100644
2538 index d7d4ec9..0000000
2539 --- a/lib/ffmpeg/patches/0077-Change-yadif-to-not-use-out-of-picture-lines.-Fixes-.patch
2540 +++ /dev/null
2541 @@ -1,133 +0,0 @@
2542 -From 42bedafe92b2921ec63024a825d4297ba39888e9 Mon Sep 17 00:00:00 2001
2543 -From: Michael Niedermayer <michaelni@gmx.at>
2544 -Date: Fri, 18 Feb 2011 19:10:33 +0100
2545 -Subject: [PATCH] Change yadif to not use out of picture lines. Fixes
2546 - issue2272.
2547 -
2548 -Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2549 ----
2550 - lib/ffmpeg/libavfilter/vf_yadif.c | 31 ++++++++++++++-------------
2551 - lib/ffmpeg/libavfilter/x86/yadif_template.c | 6 ++--
2552 - lib/ffmpeg/libavfilter/yadif.h | 6 ++--
2553 - 3 files changed, 22 insertions(+), 21 deletions(-)
2554 -
2555 -diff --git a/lib/ffmpeg/libavfilter/vf_yadif.c b/lib/ffmpeg/libavfilter/vf_yadif.c
2556 -index da91600..1ed8807 100644
2557 ---- a/lib/ffmpeg/libavfilter/vf_yadif.c
2558 -+++ b/lib/ffmpeg/libavfilter/vf_yadif.c
2559 -@@ -56,42 +56,42 @@ typedef struct {
2560 - AVFilterBufferRef *out;
2561 - void (*filter_line)(uint8_t *dst,
2562 - uint8_t *prev, uint8_t *cur, uint8_t *next,
2563 -- int w, int refs, int parity, int mode);
2564 -+ int w, int prefs, int mrefs, int parity, int mode);
2565 - } YADIFContext;
2566 -
2567 - static void filter_line_c(uint8_t *dst,
2568 - uint8_t *prev, uint8_t *cur, uint8_t *next,
2569 -- int w, int refs, int parity, int mode)
2570 -+ int w, int prefs, int mrefs, int parity, int mode)
2571 - {
2572 - int x;
2573 - uint8_t *prev2 = parity ? prev : cur ;
2574 - uint8_t *next2 = parity ? cur : next;
2575 - for (x = 0; x < w; x++) {
2576 -- int c = cur[-refs];
2577 -+ int c = cur[mrefs];
2578 - int d = (prev2[0] + next2[0])>>1;
2579 -- int e = cur[+refs];
2580 -+ int e = cur[prefs];
2581 - int temporal_diff0 = FFABS(prev2[0] - next2[0]);
2582 -- int temporal_diff1 =(FFABS(prev[-refs] - c) + FFABS(prev[+refs] - e) )>>1;
2583 -- int temporal_diff2 =(FFABS(next[-refs] - c) + FFABS(next[+refs] - e) )>>1;
2584 -+ int temporal_diff1 =(FFABS(prev[mrefs] - c) + FFABS(prev[prefs] - e) )>>1;
2585 -+ int temporal_diff2 =(FFABS(next[mrefs] - c) + FFABS(next[prefs] - e) )>>1;
2586 - int diff = FFMAX3(temporal_diff0>>1, temporal_diff1, temporal_diff2);
2587 - int spatial_pred = (c+e)>>1;
2588 -- int spatial_score = FFABS(cur[-refs-1] - cur[+refs-1]) + FFABS(c-e)
2589 -- + FFABS(cur[-refs+1] - cur[+refs+1]) - 1;
2590 -+ int spatial_score = FFABS(cur[mrefs-1] - cur[prefs-1]) + FFABS(c-e)
2591 -+ + FFABS(cur[mrefs+1] - cur[prefs+1]) - 1;
2592 -
2593 - #define CHECK(j)\
2594 -- { int score = FFABS(cur[-refs-1+j] - cur[+refs-1-j])\
2595 -- + FFABS(cur[-refs +j] - cur[+refs -j])\
2596 -- + FFABS(cur[-refs+1+j] - cur[+refs+1-j]);\
2597 -+ { int score = FFABS(cur[mrefs-1+j] - cur[prefs-1-j])\
2598 -+ + FFABS(cur[mrefs +j] - cur[prefs -j])\
2599 -+ + FFABS(cur[mrefs+1+j] - cur[prefs+1-j]);\
2600 - if (score < spatial_score) {\
2601 - spatial_score= score;\
2602 -- spatial_pred= (cur[-refs +j] + cur[+refs -j])>>1;\
2603 -+ spatial_pred= (cur[mrefs +j] + cur[prefs -j])>>1;\
2604 -
2605 - CHECK(-1) CHECK(-2) }} }}
2606 - CHECK( 1) CHECK( 2) }} }}
2607 -
2608 - if (mode < 2) {
2609 -- int b = (prev2[-2*refs] + next2[-2*refs])>>1;
2610 -- int f = (prev2[+2*refs] + next2[+2*refs])>>1;
2611 -+ int b = (prev2[2*mrefs] + next2[2*mrefs])>>1;
2612 -+ int f = (prev2[2*prefs] + next2[2*prefs])>>1;
2613 - #if 0
2614 - int a = cur[-3*refs];
2615 - int g = cur[+3*refs];
2616 -@@ -139,7 +139,8 @@ static void filter(AVFilterContext *ctx, AVFilterBufferRef *dstpic,
2617 - uint8_t *cur = &yadif->cur ->data[i][y*refs];
2618 - uint8_t *next = &yadif->next->data[i][y*refs];
2619 - uint8_t *dst = &dstpic->data[i][y*dstpic->linesize[i]];
2620 -- yadif->filter_line(dst, prev, cur, next, w, refs, parity ^ tff, yadif->mode);
2621 -+ int mode = y==1 || y+2==h ? 2 : yadif->mode;
2622 -+ yadif->filter_line(dst, prev, cur, next, w, y+1<h ? refs : -refs, y ? -refs : refs, parity ^ tff, mode);
2623 - } else {
2624 - memcpy(&dstpic->data[i][y*dstpic->linesize[i]],
2625 - &yadif->cur->data[i][y*refs], w);
2626 -diff --git a/lib/ffmpeg/libavfilter/x86/yadif_template.c b/lib/ffmpeg/libavfilter/x86/yadif_template.c
2627 -index 3e520cb..50ea843 100644
2628 ---- a/lib/ffmpeg/libavfilter/x86/yadif_template.c
2629 -+++ b/lib/ffmpeg/libavfilter/x86/yadif_template.c
2630 -@@ -105,7 +105,7 @@
2631 -
2632 - void RENAME(ff_yadif_filter_line)(uint8_t *dst,
2633 - uint8_t *prev, uint8_t *cur, uint8_t *next,
2634 -- int w, int refs, int parity, int mode)
2635 -+ int w, int prefs, int mrefs, int parity, int mode)
2636 - {
2637 - DECLARE_ALIGNED(16, uint8_t, tmp0[16]);
2638 - DECLARE_ALIGNED(16, uint8_t, tmp1[16]);
2639 -@@ -226,8 +226,8 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
2640 - :[prev] "r"(prev),\
2641 - [cur] "r"(cur),\
2642 - [next] "r"(next),\
2643 -- [prefs]"r"((x86_reg)refs),\
2644 -- [mrefs]"r"((x86_reg)-refs),\
2645 -+ [prefs]"r"((x86_reg)prefs),\
2646 -+ [mrefs]"r"((x86_reg)mrefs),\
2647 - [mode] "g"(mode)\
2648 - );\
2649 - __asm__ volatile(MOV" "MM"1, %0" :"=m"(*dst));\
2650 -diff --git a/lib/ffmpeg/libavfilter/yadif.h b/lib/ffmpeg/libavfilter/yadif.h
2651 -index 072812c..ff574da 100644
2652 ---- a/lib/ffmpeg/libavfilter/yadif.h
2653 -+++ b/lib/ffmpeg/libavfilter/yadif.h
2654 -@@ -23,14 +23,14 @@
2655 -
2656 - void ff_yadif_filter_line_mmx(uint8_t *dst,
2657 - uint8_t *prev, uint8_t *cur, uint8_t *next,
2658 -- int w, int refs, int parity, int mode);
2659 -+ int w, int prefs, int mrefs, int parity, int mode);
2660 -
2661 - void ff_yadif_filter_line_sse2(uint8_t *dst,
2662 - uint8_t *prev, uint8_t *cur, uint8_t *next,
2663 -- int w, int refs, int parity, int mode);
2664 -+ int w, int prefs, int mrefs, int parity, int mode);
2665 -
2666 - void ff_yadif_filter_line_ssse3(uint8_t *dst,
2667 - uint8_t *prev, uint8_t *cur, uint8_t *next,
2668 -- int w, int refs, int parity, int mode);
2669 -+ int w, int prefs, int mrefs, int parity, int mode);
2670 -
2671 - #endif /* AVFILTER_YADIF_H */
2672 ---
2673 -1.7.7.2
2674 -
2675 diff --git a/lib/ffmpeg/patches/0078-fixed-ffmpeg-build-with-gcc-4.7-on-x86.patch b/lib/ffmpeg/patches/0078-fixed-ffmpeg-build-with-gcc-4.7-on-x86.patch
2676 deleted file mode 100644
2677 index 6fe3958..0000000
2678 --- a/lib/ffmpeg/patches/0078-fixed-ffmpeg-build-with-gcc-4.7-on-x86.patch
2679 +++ /dev/null
2680 @@ -1,68 +0,0 @@
2681 -From 400b84bb8d3d2a9c202fa3da4fb01279230a87ce Mon Sep 17 00:00:00 2001
2682 -From: Anssi Hannula <anssi@xbmc.org>
2683 -Date: Wed, 7 Mar 2012 23:08:54 +0200
2684 -Subject: [PATCH] fixed: ffmpeg build with gcc 4.7 on x86
2685 -
2686 -Backport da4c7cce2100a4e4f9276b4f17e260be47b53f41 from FFmpeg git:
2687 -
2688 -> From: Mans Rullgard <mans@mansr.com>
2689 -> Date: Tue, 26 Jul 2011 11:23:43 +0000 (+0100)
2690 ->
2691 -> x86: fix build with gcc 4.7
2692 ->
2693 -> The upcoming gcc 4.7 has more advanced constant propagation
2694 -> resulting some inline asm operands becoming constants and thus
2695 -> emitted as literals, sometimes in contexts where this results
2696 -> in invalid instructions.
2697 ->
2698 -> This patch changes the constraints of the relevant operands
2699 -> to "rm" thus forcing a valid type. While obviously suboptimal,
2700 -> this is what older gcc versions already did, and there is no
2701 -> change to the code generated with these.
2702 ----
2703 - lib/ffmpeg/libavcodec/x86/h264_qpel_mmx.c | 8 ++++----
2704 - 1 files changed, 4 insertions(+), 4 deletions(-)
2705 -
2706 -diff --git a/lib/ffmpeg/libavcodec/x86/h264_qpel_mmx.c b/lib/ffmpeg/libavcodec/x86/h264_qpel_mmx.c
2707 -index d8ceca1..f5af44e 100644
2708 ---- a/lib/ffmpeg/libavcodec/x86/h264_qpel_mmx.c
2709 -+++ b/lib/ffmpeg/libavcodec/x86/h264_qpel_mmx.c
2710 -@@ -398,7 +398,7 @@ static av_noinline void OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(uint8_t *dst,
2711 - "2: \n\t"\
2712 - \
2713 - : "+a"(src), "+c"(dst)\
2714 -- : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
2715 -+ : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
2716 - : "memory"\
2717 - );\
2718 - src += 4-(h+5)*srcStride;\
2719 -@@ -446,7 +446,7 @@ static av_always_inline void OPNAME ## h264_qpel8or16_hv1_lowpass_ ## MMX(int16_
2720 - QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\
2721 - "2: \n\t"\
2722 - : "+a"(src)\
2723 -- : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)\
2724 -+ : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)\
2725 - : "memory"\
2726 - );\
2727 - tmp += 4;\
2728 -@@ -823,7 +823,7 @@ static av_noinline void OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(uint8_t *dst,
2729 - "2: \n\t"\
2730 - \
2731 - : "+a"(src), "+c"(dst)\
2732 -- : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
2733 -+ : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
2734 - : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \
2735 - "%xmm4", "%xmm5", "%xmm6", "%xmm7",)\
2736 - "memory"\
2737 -@@ -878,7 +878,7 @@ static av_always_inline void put_h264_qpel8or16_hv1_lowpass_sse2(int16_t *tmp, u
2738 - QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48)
2739 - "2: \n\t"
2740 - : "+a"(src)
2741 -- : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)
2742 -+ : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)
2743 - : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3",
2744 - "%xmm4", "%xmm5", "%xmm6", "%xmm7",)
2745 - "memory"
2746 ---
2747 -1.7.7.2
2748 -
2749 --
2750 1.7.10
2751

  ViewVC Help
Powered by ViewVC 1.1.30