X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_stream.cc;h=dfd6f718c60007a3e8e60e84f75d3833450dfe54;hb=6fde557864505b470c438e4161ee494f29b90d63;hp=ad99defeef35852ca6e725965e70f6e78ac12031;hpb=4dbc6ef917aeceb906b1ef1caf6911033e7e2c54;p=dcpomatic.git diff --git a/src/lib/ffmpeg_stream.cc b/src/lib/ffmpeg_stream.cc index ad99defee..dfd6f718c 100644 --- a/src/lib/ffmpeg_stream.cc +++ b/src/lib/ffmpeg_stream.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2014 Carl Hetherington + Copyright (C) 2013-2015 Carl Hetherington 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 @@ -19,14 +19,13 @@ #include "ffmpeg_stream.h" #include "dcpomatic_assert.h" -#include +#include "raw_convert.h" #include extern "C" { #include } using std::string; -using dcp::raw_convert; FFmpegStream::FFmpegStream (cxml::ConstNodePtr node) : name (node->string_child ("Name")) @@ -45,15 +44,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 *