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

Side by Side Diff: source/patched-ffmpeg/libavformat/matroskadec.c

Issue 8366004: Fix a bug where a pointer was cached to an array that might later move due to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « patches/to_upstream/43_mkv_seekahead_revalidate.patch ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Matroska file demuxer 2 * Matroska file demuxer
3 * Copyright (c) 2003-2008 The FFmpeg Project 3 * Copyright (c) 2003-2008 The FFmpeg Project
4 * 4 *
5 * This file is part of FFmpeg. 5 * This file is part of FFmpeg.
6 * 6 *
7 * FFmpeg is free software; you can redistribute it and/or 7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version. 10 * version 2.1 of the License, or (at your option) any later version.
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 avio_seek(matroska->ctx->pb, before_pos, SEEK_SET); 1234 avio_seek(matroska->ctx->pb, before_pos, SEEK_SET);
1235 matroska->level_up = level_up; 1235 matroska->level_up = level_up;
1236 matroska->current_id = saved_id; 1236 matroska->current_id = saved_id;
1237 1237
1238 return ret; 1238 return ret;
1239 } 1239 }
1240 1240
1241 static void matroska_execute_seekhead(MatroskaDemuxContext *matroska) 1241 static void matroska_execute_seekhead(MatroskaDemuxContext *matroska)
1242 { 1242 {
1243 EbmlList *seekhead_list = &matroska->seekhead; 1243 EbmlList *seekhead_list = &matroska->seekhead;
1244 MatroskaSeekhead *seekhead = seekhead_list->elem;
1245 int64_t before_pos = avio_tell(matroska->ctx->pb); 1244 int64_t before_pos = avio_tell(matroska->ctx->pb);
1246 int i; 1245 int i;
1247 1246
1248 // we should not do any seeking in the streaming case 1247 // we should not do any seeking in the streaming case
1249 if (!matroska->ctx->pb->seekable || 1248 if (!matroska->ctx->pb->seekable ||
1250 (matroska->ctx->flags & AVFMT_FLAG_IGNIDX)) 1249 (matroska->ctx->flags & AVFMT_FLAG_IGNIDX))
1251 return; 1250 return;
1252 1251
1253 for (i = 0; i < seekhead_list->nb_elem; i++) { 1252 for (i = 0; i < seekhead_list->nb_elem; i++) {
1253 MatroskaSeekhead *seekhead = seekhead_list->elem;
1254 if (seekhead[i].pos <= before_pos) 1254 if (seekhead[i].pos <= before_pos)
1255 continue; 1255 continue;
1256 1256
1257 // defer cues parsing until we actually need cue data. 1257 // defer cues parsing until we actually need cue data.
1258 if (seekhead[i].id == MATROSKA_ID_CUES) { 1258 if (seekhead[i].id == MATROSKA_ID_CUES) {
1259 matroska->cues_parsing_deferred = 1; 1259 matroska->cues_parsing_deferred = 1;
1260 continue; 1260 continue;
1261 } 1261 }
1262 1262
1263 if (matroska_parse_seekhead_entry(matroska, i) < 0) 1263 if (matroska_parse_seekhead_entry(matroska, i) < 0)
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 AVInputFormat ff_matroska_demuxer = { 2174 AVInputFormat ff_matroska_demuxer = {
2175 "matroska,webm", 2175 "matroska,webm",
2176 NULL_IF_CONFIG_SMALL("Matroska/WebM file format"), 2176 NULL_IF_CONFIG_SMALL("Matroska/WebM file format"),
2177 sizeof(MatroskaDemuxContext), 2177 sizeof(MatroskaDemuxContext),
2178 matroska_probe, 2178 matroska_probe,
2179 matroska_read_header, 2179 matroska_read_header,
2180 matroska_read_packet, 2180 matroska_read_packet,
2181 matroska_read_close, 2181 matroska_read_close,
2182 matroska_read_seek, 2182 matroska_read_seek,
2183 }; 2183 };
OLDNEW
« no previous file with comments | « patches/to_upstream/43_mkv_seekahead_revalidate.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698