[vlc-commits] demux: adaptative: remove dead code (cid #1313827)
Tristan Matthews
git at videolan.org
Fri Jul 31 11:50:06 CEST 2015
vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Fri Jul 31 05:46:52 2015 -0400| [93ff5fca3ba5a6cac91ba9ca7f5bbfe3ac53a48a] | committer: Tristan Matthews
demux: adaptative: remove dead code (cid #1313827)
Returns before ever incrementing.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93ff5fca3ba5a6cac91ba9ca7f5bbfe3ac53a48a
---
modules/demux/adaptative/PlaylistManager.cpp | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules/demux/adaptative/PlaylistManager.cpp b/modules/demux/adaptative/PlaylistManager.cpp
index 93ecb40..fb98d55 100644
--- a/modules/demux/adaptative/PlaylistManager.cpp
+++ b/modules/demux/adaptative/PlaylistManager.cpp
@@ -217,12 +217,10 @@ mtime_t PlaylistManager::getFirstDTS() const
int PlaylistManager::getGroup() const
{
- std::vector<Stream *>::const_iterator it;
- for(it=streams.begin(); it!=streams.end(); ++it)
- {
- return (*it)->getGroup();
- }
- return -1;
+ if (!streams.empty())
+ return streams[0]->getGroup();
+ else
+ return -1;
}
int PlaylistManager::esCount() const
More information about the vlc-commits
mailing list