2c2fd3c257
In the past xbmc delivered its own ffmpeg source code with specific patches to address bugs found during the use of xbmc. For Helix the ffmpeg source code was removed, Helix uses a vanilla ffmpeg source tarball and applies this patchset on top of it. Downloaded from https://github.com/xbmc/FFmpeg/compare/FFmpeg:release/2.5...release/2.5-xbmc.patch [Thomas: use individual patches instead.] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From fbd0b8b0239d3786b941adc89322b8e49e4c768e Mon Sep 17 00:00:00 2001
|
|
From: Joakim Plate <elupus@ecce.se>
|
|
Date: Mon, 12 Sep 2011 21:37:17 +0200
|
|
Subject: [PATCH 02/13] asf hacks
|
|
|
|
Patch part of the XBMC patch set for ffmpeg, downloaded from
|
|
https://github.com/xbmc/FFmpeg/.
|
|
|
|
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
---
|
|
libavformat/asfdec.c | 11 +++++++++++
|
|
1 file changed, 11 insertions(+)
|
|
|
|
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
|
|
index 7f7bb4d..8911987 100644
|
|
--- a/libavformat/asfdec.c
|
|
+++ b/libavformat/asfdec.c
|
|
@@ -1549,9 +1549,20 @@ static int asf_read_seek(AVFormatContext *s, int stream_index,
|
|
AVStream *st = s->streams[stream_index];
|
|
int ret = 0;
|
|
|
|
+ if (pts == 0) {
|
|
+ // this is a hack since av_gen_search searches the entire file in this case
|
|
+ av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", s->data_offset);
|
|
+ if (avio_seek(s->pb, s->data_offset, SEEK_SET) < 0)
|
|
+ return -1;
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
if (s->packet_size <= 0)
|
|
return -1;
|
|
|
|
+ if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO)
|
|
+ return -1;
|
|
+
|
|
/* Try using the protocol's read_seek if available */
|
|
if (s->pb) {
|
|
int ret = avio_seek_time(s->pb, stream_index, pts, flags);
|
|
--
|
|
2.1.0
|
|
|