summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-03-08 17:05:34 +0000
committerjstebbins <[email protected]>2011-03-08 17:05:34 +0000
commit23518c8922f6d29f5604b8e91b350088eeb0a755 (patch)
treee3132422e7ab92cb2f47c4622faabeb42d447928
parentfafc7fe48ffac1f7aeb878a00de44a0f49b28852 (diff)
Remove a workaround for an ffmpeg bug that has been fixed.
Removal of the workaround also removes the need for a patch that fails to apply cleanly to latest ffmpeg git. So remove the patch as well. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3833 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--contrib/ffmpeg/A05-avi-seek.patch55
-rw-r--r--libhb/stream.c11
2 files changed, 0 insertions, 66 deletions
diff --git a/contrib/ffmpeg/A05-avi-seek.patch b/contrib/ffmpeg/A05-avi-seek.patch
deleted file mode 100644
index e5df7316a..000000000
--- a/contrib/ffmpeg/A05-avi-seek.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Index: libavformat/avidec.c
-===================================================================
---- ffmpeg.orig/libavformat/avidec.c (revision 22950)
-+++ ffmpeg/libavformat/avidec.c (working copy)
-@@ -1072,7 +1072,7 @@
- AVIContext *avi = s->priv_data;
- AVStream *st;
- int i, index;
-- int64_t pos;
-+ int64_t pos, min_pos;
- AVIStream *ast;
-
- if (!avi->index_loaded) {
-@@ -1109,6 +1109,7 @@
- return 0;
- }
-
-+ min_pos = pos;
- for(i = 0; i < s->nb_streams; i++) {
- AVStream *st2 = s->streams[i];
- AVIStream *ast2 = st2->priv_data;
-@@ -1129,10 +1130,20 @@
- index=0;
-
- if(!avi->non_interleaved){
-- while(index>0 && st2->index_entries[index].pos > pos)
-- index--;
-- while(index+1 < st2->nb_index_entries && st2->index_entries[index].pos < pos)
-- index++;
-+ if (flags & AVSEEK_FLAG_BACKWARD) {
-+ while(index+1 < st2->nb_index_entries && st2->index_entries[index].pos < pos)
-+ index++;
-+ while(index>0 && st2->index_entries[index].pos > pos)
-+ index--;
-+ if (st2->index_entries[index].pos < min_pos)
-+ min_pos = st2->index_entries[index].pos;
-+ }
-+ else {
-+ while(index>0 && st2->index_entries[index].pos > pos)
-+ index--;
-+ while(index+1 < st2->nb_index_entries && st2->index_entries[index].pos < pos)
-+ index++;
-+ }
- }
-
- // av_log(s, AV_LOG_DEBUG, "%"PRId64" %d %"PRId64"\n", timestamp, index, st2->index_entries[index].timestamp);
-@@ -1141,7 +1152,7 @@
- }
-
- /* do the seek */
-- url_fseek(s->pb, pos, SEEK_SET);
-+ url_fseek(s->pb, min_pos, SEEK_SET);
- avi->stream_index= -1;
- return 0;
- }
diff --git a/libhb/stream.c b/libhb/stream.c
index 4b4653760..3d80a590b 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -1452,17 +1452,6 @@ int hb_stream_seek_chapter( hb_stream_t * stream, int chapter_num )
{
av_seek_frame( stream->ffmpeg_ic, -1, pos, 0);
}
- else
- {
- // ffmpeg has a bug that causes the first PTS after
- // av_find_stream_info() is called to be incorrect.
- // av_find_stream_info is called whenever opening a file
- // with ffmpeg. av_seek_frame clears the condition
- // that causes the problem. since hb_stream_seek_chapter
- // is called before we start reading, make sure
- // we do a seek here.
- av_seek_frame( stream->ffmpeg_ic, -1, ffmpeg_initial_timestamp( stream ), AVSEEK_FLAG_BACKWARD | AVSEEK_FLAG_ANY );
- }
return 1;
}