From 30562e8ba9d98475c8bb0b570f41da1db8c09edb Mon Sep 17 00:00:00 2001 From: jstebbins Date: Sun, 13 Nov 2011 19:20:43 +0000 Subject: Fix seeking in wmv files that have no index Libav's fallback binary search seek fails because a PTS is never generated for video stream types that have B frames. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4348 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- contrib/ffmpeg/A05-asf-seek.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 contrib/ffmpeg/A05-asf-seek.patch (limited to 'contrib/ffmpeg') diff --git a/contrib/ffmpeg/A05-asf-seek.patch b/contrib/ffmpeg/A05-asf-seek.patch new file mode 100644 index 000000000..c19ad496b --- /dev/null +++ b/contrib/ffmpeg/A05-asf-seek.patch @@ -0,0 +1,16 @@ +diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c +index 0245340..85b2649 100644 +--- a/libavformat/asfdec.c ++++ b/libavformat/asfdec.c +@@ -1172,7 +1172,10 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, int64_t *ppos, + return AV_NOPTS_VALUE; + } + +- pts= pkt->pts; ++ if (pkt->pts == AV_NOPTS_VALUE) ++ pts = pkt->dts; ++ else ++ pts = pkt->pts; + + av_free_packet(pkt); + if(pkt->flags&AV_PKT_FLAG_KEY){ -- cgit v1.2.3