projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c30f9b2
)
Speculative simplification of FFmpegStream::uses_index.
author
Carl Hetherington
<cth@carlh.net>
Sun, 8 Feb 2015 20:07:50 +0000
(20:07 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 8 Feb 2015 20:07:50 +0000
(20:07 +0000)
src/lib/ffmpeg_stream.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg_stream.cc
b/src/lib/ffmpeg_stream.cc
index ad99defeef35852ca6e725965e70f6e78ac12031..f28a2f14e7e7f78ccabe5815a43e539757c639f8 100644
(file)
--- a/
src/lib/ffmpeg_stream.cc
+++ b/
src/lib/ffmpeg_stream.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2013-201
4
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-201
5
Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-45,15
+45,7
@@
FFmpegStream::as_xml (xmlpp::Node* root) const
bool
FFmpegStream::uses_index (AVFormatContext const * fc, int index) const
{
bool
FFmpegStream::uses_index (AVFormatContext const * fc, int index) const
{
- size_t i = 0;
- while (i < fc->nb_streams) {
- if (fc->streams[i]->id == _id) {
- return int (i) == index;
- }
- ++i;
- }
-
- return false;
+ return fc->streams[index]->id == _id;
}
AVStream *
}
AVStream *