aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelupus <elupus@xbmc.org>2012-04-17 01:18:26 +0200
committerelupus <elupus@xbmc.org>2012-04-17 01:20:34 +0200
commit6983e28199c3a713041ab40ec9b1603922ae5138 (patch)
treea000052820d4ddd2417d3d3081129da9ce2d8dbb /lib
parent45e41b9096869062a2113590f3158321d06dea8b (diff)
[ffmpeg] Add patch for still frame hack
Diffstat (limited to 'lib')
-rw-r--r--lib/ffmpeg/patches/0028-fixed-dvd-still-frames-ended-up-in-internal-lavf.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/ffmpeg/patches/0028-fixed-dvd-still-frames-ended-up-in-internal-lavf.patch b/lib/ffmpeg/patches/0028-fixed-dvd-still-frames-ended-up-in-internal-lavf.patch
new file mode 100644
index 0000000000..db2b39a5ed
--- /dev/null
+++ b/lib/ffmpeg/patches/0028-fixed-dvd-still-frames-ended-up-in-internal-lavf.patch
@@ -0,0 +1,35 @@
+From 90a3ab0d766e3a026a37f7290f59abda30c4de32 Mon Sep 17 00:00:00 2001
+From: elupus <elupus@xbmc.org>
+Date: Tue, 17 Apr 2012 01:13:15 +0200
+Subject: [PATCH] fixed: dvd still frames ended up in internal lavf buffer
+
+This is very hackish, but it's the old solution we had for dvd
+still frames. The problem is that the demuxer asks for probing
+of the codec in the mpeg stream. This causes lavf to read the
+whole menu structure into internal buffers. After which, it
+won't read from input stream anymore and no events triggers.
+
+The only proper fix to avoid this is to allow this situation
+in our navigator. This needs further work so that we can
+process HOP/ACTIVATION events in libdvdnav without advancing
+stream.
+---
+ libavformat/utils.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index 1bf81a5..051dcc0 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -833,7 +833,7 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
+
+ if(end || av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)){
+ int score= set_codec_from_probe_data(s, st, pd);
+- if( (st->codec->codec_id != CODEC_ID_NONE && score > AVPROBE_SCORE_MAX/4)
++ if( (st->codec->codec_id != CODEC_ID_NONE && score > AVPROBE_SCORE_MAX/4-1)
+ || end){
+ pd->buf_size=0;
+ av_freep(&pd->buf);
+--
+1.7.9.4
+