input/ffmpeg: refactor error code path

This commit is contained in:
Max Kellermann 2014-08-18 09:52:25 +02:00
parent 12ba1957d0
commit 27139bf41f

View File

@ -138,13 +138,13 @@ FfmpegInputStream::Seek(offset_type new_offset, Error &error)
{ {
auto result = avio_seek(h, new_offset, SEEK_SET); auto result = avio_seek(h, new_offset, SEEK_SET);
if (result >= 0) { if (result < 0) {
eof = false;
return true;
} else {
error.Set(ffmpeg_domain, "avio_seek() failed"); error.Set(ffmpeg_domain, "avio_seek() failed");
return false; return false;
} }
eof = false;
return true;
} }
const InputPlugin input_plugin_ffmpeg = { const InputPlugin input_plugin_ffmpeg = {