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

Side by Side Diff: patches/from_upstream/20_r25798_ogg_data_offset.patch

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 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « binaries/win/avutil-50.dll ('k') | source/patched-ffmpeg-mt/libavformat/oggdec.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 diff -wurp -N orig/libavformat/oggdec.c ffmpeg-mt/libavformat/oggdec.c
2 --- orig/libavformat/oggdec.c 2010-11-29 08:28:58 -0800
3 +++ ffmpeg-mt/libavformat/oggdec.c 2010-11-29 08:29:07 -0800
4 @@ -383,9 +383,27 @@ ogg_packet (AVFormatContext * s, int *st
5 if (!os->header){
6 os->segp = segp;
7 os->psize = psize;
8 - if (!ogg->headers)
9 - s->data_offset = os->sync_pos;
10 +
11 + // We've reached the first non-header packet. All header
12 + // packets must be complete before the first non-header
13 + // one, so everything that follows must be non-header.
14 ogg->headers = 1;
15 +
16 + // Update the header state for all streams and
17 + // compute the data_offset.
18 + s->data_offset = os->sync_pos;
19 + for (i = 0; i < ogg->nstreams; i++) {
20 + struct ogg_stream *cur_os = ogg->streams + i;
21 + // Set stream header state to 0 if its last packet
22 + // was a header.
23 + if (cur_os->header > 0)
24 + cur_os->header = 0;
25 +
26 + // if we have a partial non-header packet, its start is
27 + // obviously at or after the data start.
28 + if (cur_os->incomplete)
29 + s->data_offset = FFMIN(s->data_offset, cur_os->sync_pos);
30 + }
31 }else{
32 os->pstart += os->psize;
33 os->psize = 0;
OLDNEW
« no previous file with comments | « binaries/win/avutil-50.dll ('k') | source/patched-ffmpeg-mt/libavformat/oggdec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698