diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2014-03-09 10:27:55 +1300 |
---|---|---|
committer | Jonathan Marshall <jmarshall@xbmc.org> | 2014-03-09 13:56:47 +1300 |
commit | 3df4e6e5eb7e823b99b110dc222b111696b45038 (patch) | |
tree | d04de673f29e3728f0ef444a564d58a080e6f2c8 | |
parent | 0afd00f715ea587f859b2de888c39a6229eb8c3f (diff) |
Merge pull request #4375 from FernetMenta/wma
fix assert when playing certain wma files
-rw-r--r-- | lib/ffmpeg/libavformat/asfdec.c | 1 | ||||
-rw-r--r-- | lib/ffmpeg/patches/0071-ffmpeg-backport-avformat-asfdec-call-read-frame-flush.patch | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/lib/ffmpeg/libavformat/asfdec.c b/lib/ffmpeg/libavformat/asfdec.c index c7e16f5f23..7f141775fe 100644 --- a/lib/ffmpeg/libavformat/asfdec.c +++ b/lib/ffmpeg/libavformat/asfdec.c @@ -1401,6 +1401,7 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, if (avio_seek(s->pb, pos, SEEK_SET) < 0) return AV_NOPTS_VALUE; + ff_read_frame_flush(s); asf_reset_header(s); for (;;) { if (av_read_frame(s, pkt) < 0) { diff --git a/lib/ffmpeg/patches/0071-ffmpeg-backport-avformat-asfdec-call-read-frame-flush.patch b/lib/ffmpeg/patches/0071-ffmpeg-backport-avformat-asfdec-call-read-frame-flush.patch new file mode 100644 index 0000000000..5198548a4e --- /dev/null +++ b/lib/ffmpeg/patches/0071-ffmpeg-backport-avformat-asfdec-call-read-frame-flush.patch @@ -0,0 +1,30 @@ +From 4b101ab02ea762f70903e894a4b002b229526a4a Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michaelni@gmx.at> +Date: Mon, 12 Aug 2013 22:52:23 +0200 +Subject: [PATCH] avformat/asfdec: call ff_read_frame_flush() in asf_read_pts() + +flushing just the asf demuxer but not the cores buffers leads to inconsistencies +and a "random" packet position which later causes an assertion failure + +Fixes Ticket2853 + +Signed-off-by: Michael Niedermayer <michaelni@gmx.at> +--- + libavformat/asfdec.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c +index cffbcc4..0d6370d 100644 +--- a/libavformat/asfdec.c ++++ b/libavformat/asfdec.c +@@ -1414,6 +1414,7 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, + if (avio_seek(s->pb, pos, SEEK_SET) < 0) + return AV_NOPTS_VALUE; + ++ ff_read_frame_flush(s); + asf_reset_header(s); + for (;;) { + if (av_read_frame(s, pkt) < 0) { +-- +1.8.5.5 + |