From 27139bf41f145fb11ae266baafdf00297404306b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 18 Aug 2014 09:52:25 +0200 Subject: input/ffmpeg: refactor error code path --- src/input/plugins/FfmpegInputPlugin.cxx | 8 ++++---- 1 file 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 = { -- cgit v1.2.3