[FFmpeg-devel] [PATCH] Revert "oggdec:Correct duration"
Andrew Scherkus
scherkus at chromium.org
Wed Aug 24 17:47:45 CEST 2011
Hello,
We got some Chromium bug reports about incorrect ogg durations last
time we updated FFmpeg. I traced it back to 5901cd6... which was
applied from an old patch from ffmpeg2theora.
It looks like someone else had already made a similar fix in
44a088e... which means that applying both patches made for incorrect
duration calculations.
Thanks,
Andrew
---
Revert "oggdec:Correct duration"
This reverts commit 5901cd6236d97b34fe59a47ba0fd6da8f647d1f1.
A similar patch had already been applied in
44a088eab7f223e0b79ae5296cdb07d6f165c91d. Having both patches applied
causes ogg durations to be miscalculated.
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index cd55922..11ce296 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -480,18 +480,6 @@ static int ogg_get_length(AVFormatContext *s)
ogg_restore (s, 0);
- ogg_save (s);
- avio_seek (s->pb, 0, SEEK_SET);
- while (!ogg_read_page (s, &i)){
- if (ogg->streams[i].granule != -1 && ogg->streams[i].granule != 0 &&
- ogg->streams[i].codec) {
- s->streams[i]->duration -=
- ogg_gptopts (s, i, ogg->streams[i].granule, NULL);
- break;
- }
- }
- ogg_restore (s, 0);
-
return 0;
}
More information about the ffmpeg-devel
mailing list