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

Side by Side Diff: source/libvpx/webmdec.cc

Issue 1339513003: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « source/libvpx/vpx_dsp/x86/vpx_subpixel_8t_ssse3.asm ('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 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 const mkvparser::VideoTrack* video_track = NULL; 87 const mkvparser::VideoTrack* video_track = NULL;
88 for (unsigned long i = 0; i < tracks->GetTracksCount(); ++i) { 88 for (unsigned long i = 0; i < tracks->GetTracksCount(); ++i) {
89 const mkvparser::Track* const track = tracks->GetTrackByIndex(i); 89 const mkvparser::Track* const track = tracks->GetTrackByIndex(i);
90 if (track->GetType() == mkvparser::Track::kVideo) { 90 if (track->GetType() == mkvparser::Track::kVideo) {
91 video_track = static_cast<const mkvparser::VideoTrack*>(track); 91 video_track = static_cast<const mkvparser::VideoTrack*>(track);
92 webm_ctx->video_track_index = track->GetNumber(); 92 webm_ctx->video_track_index = track->GetNumber();
93 break; 93 break;
94 } 94 }
95 } 95 }
96 96
97 if (video_track == NULL) { 97 if (video_track == NULL || video_track->GetCodecId() == NULL) {
98 rewind_and_reset(webm_ctx, vpx_ctx); 98 rewind_and_reset(webm_ctx, vpx_ctx);
99 return 0; 99 return 0;
100 } 100 }
101 101
102 if (!strncmp(video_track->GetCodecId(), "V_VP8", 5)) { 102 if (!strncmp(video_track->GetCodecId(), "V_VP8", 5)) {
103 vpx_ctx->fourcc = VP8_FOURCC; 103 vpx_ctx->fourcc = VP8_FOURCC;
104 } else if (!strncmp(video_track->GetCodecId(), "V_VP9", 5)) { 104 } else if (!strncmp(video_track->GetCodecId(), "V_VP9", 5)) {
105 vpx_ctx->fourcc = VP9_FOURCC; 105 vpx_ctx->fourcc = VP9_FOURCC;
106 } else if (!strncmp(video_track->GetCodecId(), "V_VP10", 6)) { 106 } else if (!strncmp(video_track->GetCodecId(), "V_VP10", 6)) {
107 vpx_ctx->fourcc = VP10_FOURCC; 107 vpx_ctx->fourcc = VP10_FOURCC;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 webm_ctx->block_frame_index = 0; 222 webm_ctx->block_frame_index = 0;
223 webm_ctx->timestamp_ns = 0; 223 webm_ctx->timestamp_ns = 0;
224 webm_ctx->reached_eos = 0; 224 webm_ctx->reached_eos = 0;
225 225
226 return 0; 226 return 0;
227 } 227 }
228 228
229 void webm_free(struct WebmInputContext *webm_ctx) { 229 void webm_free(struct WebmInputContext *webm_ctx) {
230 reset(webm_ctx); 230 reset(webm_ctx);
231 } 231 }
OLDNEW
« no previous file with comments | « source/libvpx/vpx_dsp/x86/vpx_subpixel_8t_ssse3.asm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698