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

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

Issue 6598004: Initialize a variable, and revalidate indexes when necessary.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 9 years, 10 months 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/to_upstream/24_ogg_index.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 76041)
+++ source/patched-ffmpeg-mt/libavformat/oggdec.c (working copy)
@@ -610,10 +610,9 @@
int64_t pos_limit)
{
struct ogg *ogg = s->priv_data;
- struct ogg_stream *os = ogg->streams + stream_index;
ByteIOContext *bc = s->pb;
int64_t pts = AV_NOPTS_VALUE;
- int i;
+ int i = -1;
int packet = 0;
int64_t start_pos = *pos_arg;
url_fseek(bc, *pos_arg, SEEK_SET);
@@ -621,6 +620,7 @@
while (url_ftell(bc) < pos_limit && !ogg_packet(s, &i, NULL, NULL, pos_arg)) {
if (i == stream_index) {
+ struct ogg_stream *os = ogg->streams + stream_index;
pts = ogg_calc_pts(s, i, NULL);
if (os->keyframe_seek && !(os->pflags & AV_PKT_FLAG_KEY))
pts = AV_NOPTS_VALUE;
@@ -655,12 +655,14 @@
os->keyframe_seek = 1;
ret = av_seek_frame_binary(s, stream_index, timestamp, flags);
+ os = ogg->streams + stream_index;
scherkus (not reviewing) 2011/02/26 00:42:27 I'm lost as to what's changing streams/stream_inde
if (ret < 0)
os->keyframe_seek = 0;
// Save the position seeked to.
pos_arg = seek_pos = url_ftell(s->pb);
seek_pts = ogg_read_timestamp(s, stream_index, &pos_arg, url_fsize(s->pb));
+ os = ogg->streams + stream_index;
scherkus (not reviewing) 2011/02/26 00:42:27 ditto!
// Since we have seeked to the beginning then reset lastpts and lastdts to 0.
if (!seek_pts) {
« no previous file with comments | « patches/to_upstream/24_ogg_index.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698