Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: source/patched-ffmpeg-mt/libavformat/oggdec.c

Issue 5369006: ffmpeg binaries for chromium ogg data patch ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « patches/from_upstream/20_r25798_ogg_data_offset.patch ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/patched-ffmpeg-mt/libavformat/oggdec.c
===================================================================
--- source/patched-ffmpeg-mt/libavformat/oggdec.c (revision 67543)
+++ source/patched-ffmpeg-mt/libavformat/oggdec.c (working copy)
@@ -383,9 +383,27 @@
if (!os->header){
os->segp = segp;
os->psize = psize;
- if (!ogg->headers)
- s->data_offset = os->sync_pos;
+
+ // We've reached the first non-header packet. All header
+ // packets must be complete before the first non-header
+ // one, so everything that follows must be non-header.
ogg->headers = 1;
+
+ // Update the header state for all streams and
+ // compute the data_offset.
+ s->data_offset = os->sync_pos;
+ for (i = 0; i < ogg->nstreams; i++) {
+ struct ogg_stream *cur_os = ogg->streams + i;
+ // Set stream header state to 0 if its last packet
+ // was a header.
+ if (cur_os->header > 0)
+ cur_os->header = 0;
+
+ // if we have a partial non-header packet, its start is
+ // obviously at or after the data start.
+ if (cur_os->incomplete)
+ s->data_offset = FFMIN(s->data_offset, cur_os->sync_pos);
+ }
}else{
os->pstart += os->psize;
os->psize = 0;
« no previous file with comments | « patches/from_upstream/20_r25798_ogg_data_offset.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698