diff options
author | Max Kellermann <max@duempel.org> | 2014-08-18 09:52:25 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-18 09:52:25 +0200 |
commit | 27139bf41f145fb11ae266baafdf00297404306b (patch) | |
tree | 354641b55b26dce935c41639cb580e4d1efb8795 /src | |
parent | 12ba1957d0d15af67be9f3c567a21379b69ea8fd (diff) | |
download | mpd-27139bf41f145fb11ae266baafdf00297404306b.tar.gz mpd-27139bf41f145fb11ae266baafdf00297404306b.tar.xz mpd-27139bf41f145fb11ae266baafdf00297404306b.zip |
input/ffmpeg: refactor error code path
Diffstat (limited to 'src')
-rw-r--r-- | src/input/plugins/FfmpegInputPlugin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input/plugins/FfmpegInputPlugin.cxx b/src/input/plugins/FfmpegInputPlugin.cxx index b01bd2ffc..a31014c26 100644 --- a/src/input/plugins/FfmpegInputPlugin.cxx +++ b/src/input/plugins/FfmpegInputPlugin.cxx @@ -138,13 +138,13 @@ FfmpegInputStream::Seek(offset_type new_offset, Error &error) { auto result = avio_seek(h, new_offset, SEEK_SET); - if (result >= 0) { - eof = false; - return true; - } else { + if (result < 0) { error.Set(ffmpeg_domain, "avio_seek() failed"); return false; } + + eof = false; + return true; } const InputPlugin input_plugin_ffmpeg = { |