diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-02-08 20:07:50 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-02-08 20:07:50 +0000 |
| commit | 2fb904332e75a7bffb0665ef1adc5c9cf23313d8 (patch) | |
| tree | a1f5f4fff1452a055031c87dff45fec5e23463db /src/lib | |
| parent | c30f9b2c7fc20e05e73b0d5ebf9dae9a1d87eeb9 (diff) | |
Speculative simplification of FFmpegStream::uses_index.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/ffmpeg_stream.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/ffmpeg_stream.cc b/src/lib/ffmpeg_stream.cc index ad99defee..f28a2f14e 100644 --- a/src/lib/ffmpeg_stream.cc +++ b/src/lib/ffmpeg_stream.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2015 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 @@ -45,15 +45,7 @@ FFmpegStream::as_xml (xmlpp::Node* root) 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 * |
