Permalink
Browse files

added: several missed ffmpeg patches from our tree

These patches were applied but the patches themselves were not put in
the ffmpeg patches/ directory.
  • Loading branch information...
1 parent bc8b33c commit bfc6cd3656f1fd54530c64375e8ad0ac0a6ba180 @anssih anssih committed Jan 30, 2011
@@ -0,0 +1,25 @@
+From c19516283d106e84997242b6549d2daf1442a359 Mon Sep 17 00:00:00 2001
+From: elupus <elupus@svn>
+Date: Tue, 14 Sep 2010 00:42:57 +0000
+Subject: [PATCH] fixed: vp3 decoder should set key_frame field of AVFrame
+
+git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33768 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
+---
+ .../cores/dvdplayer/Codecs/ffmpeg/libavcodec/vp3.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git ag/libavcodec/vp3.c b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/vp3.c
+index 9a24740..83835b2 100644
+--- ag/libavcodec/vp3.c
++++ bg/libavcodec/vp3.c
+@@ -1768,6 +1768,7 @@ static int vp3_decode_frame(AVCodecContext *avctx,
+
+ s->current_frame.reference = 3;
+ s->current_frame.pict_type = s->keyframe ? FF_I_TYPE : FF_P_TYPE;
++ s->current_frame.key_frame = s->keyframe;
+ if (avctx->get_buffer(avctx, &s->current_frame) < 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
+ goto error;
+--
+1.7.3
+
@@ -0,0 +1,28 @@
+From e4d7cdb22b65aaf53ae7d617f0d6c64eee68374a Mon Sep 17 00:00:00 2001
+From: elupus <elupus@svn>
+Date: Wed, 8 Dec 2010 14:03:43 +0000
+Subject: [PATCH] changed: allow 8 second skew between streams in mov before attempting to seek
+
+git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@35598 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
+---
+ .../dvdplayer/Codecs/ffmpeg/libavformat/mov.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git ag/libavformat/mov.c b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/mov.c
+index bf986b3..6228861 100644
+--- ag/libavformat/mov.c
++++ bg/libavformat/mov.c
+@@ -2408,8 +2408,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
+ if (!sample || (url_is_streamed(s->pb) && current_sample->pos < sample->pos) ||
+ (!url_is_streamed(s->pb) &&
+ ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
+- ((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) ||
+- (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) {
++ ((FFABS(best_dts - dts) <= 8*AV_TIME_BASE && current_sample->pos < sample->pos) ||
++ (FFABS(best_dts - dts) > 8*AV_TIME_BASE && dts < best_dts)))))) {
+ sample = current_sample;
+ best_dts = dts;
+ *st = avst;
+--
+1.7.3
+
@@ -0,0 +1,39 @@
+From cdfab91b9c4b7ed2560071f5630567db174d6084 Mon Sep 17 00:00:00 2001
+From: elupus <elupus@svn>
+Date: Fri, 26 Nov 2010 20:56:48 +0000
+Subject: [PATCH] fixed: memleak in mpegts demuxer on some malformed (??) mpegts files with too large pes packets
+
+at-visions sample file brokenStream.mpg
+
+git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@35475 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
+---
+ .../dvdplayer/Codecs/ffmpeg/libavformat/mpegts.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git ag/libavformat/mpegts.c b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/mpegts.c
+index bb61e03..34bc4fc 100644
+--- ag/libavformat/mpegts.c
++++ bg/libavformat/mpegts.c
+@@ -625,6 +625,10 @@ static int64_t get_pts(const uint8_t *p)
+
+ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
+ {
++ if(pkt->data) {
++ av_log(pes->stream, AV_LOG_ERROR, "ignoring previously allocated packet on stream %d\n", pkt->stream_index);
++ av_free_packet(pkt);
++ }
+ av_init_packet(pkt);
+
+ pkt->destruct = av_destruct_packet;
+@@ -1572,6 +1576,8 @@ static int mpegts_read_packet(AVFormatContext *s,
+ }
+
+ ts->pkt = pkt;
++ ts->pkt->data = NULL;
++
+ ret = handle_packets(ts, 0);
+ if (ret < 0) {
+ /* flush pes data left */
+--
+1.7.3
+
@@ -0,0 +1,28 @@
+From c13bfaa8ca023923cc42d0808fc4f4f83260b2f7 Mon Sep 17 00:00:00 2001
+From: elupus <elupus@svn>
+Date: Thu, 15 Jul 2010 22:24:57 +0000
+Subject: [PATCH] fixed: dvd still frames as first frame caused lavf to return CODEC_ID_PROBE, aswell as put the whole menu into an internal buffer.
+
+This fixes #9470 aswell as makes our (incomplete) hacks in DVDDemuxerFFMpeg for this case redundant. Getting this upstream would be good, but we'd need a mpeg sample file. One can be generated by chopping a .vob file at a location where there is only a singular still frame available.
+
+git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31831 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
+---
+ .../dvdplayer/Codecs/ffmpeg/libavformat/utils.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git ag/libavformat/utils.c b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/utils.c
+index 2e623e2..7bc89f8 100644
+--- ag/libavformat/utils.c
++++ bg/libavformat/utils.c
+@@ -702,7 +702,7 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
+
+ if(av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)){
+ //FIXME we dont reduce score to 0 for the case of running out of buffer space in bytes
+- set_codec_from_probe_data(s, st, pd, st->probe_packets > 0 ? AVPROBE_SCORE_MAX/4 : 0);
++ set_codec_from_probe_data(s, st, pd, st->probe_packets > 0 ? AVPROBE_SCORE_MAX/4-1 : 0);
+ if(st->codec->codec_id != CODEC_ID_PROBE){
+ pd->buf_size=0;
+ av_freep(&pd->buf);
+--
+1.7.3
+

0 comments on commit bfc6cd3

Please sign in to comment.