diff options
Diffstat (limited to 'video_player')
-rw-r--r-- | video_player/src/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/video_player/src/main.cpp b/video_player/src/main.cpp index 2c6dba4..c80cf9a 100644 --- a/video_player/src/main.cpp +++ b/video_player/src/main.cpp @@ -43,7 +43,7 @@ static Json::Value handle_json_command_time_pos(mpv_handle *mpv_ctx) { Json::Value response_json(Json::objectValue); if(res < 0) { response_json["status"] = "error"; - response_json["message"] = mpv_error_string(res); + response_json["message"] = std::string("time-pos: ") + mpv_error_string(res); } else { response_json["status"] = "success"; response_json["data"] = time_pos; @@ -58,7 +58,7 @@ static Json::Value handle_json_command_duration(mpv_handle *mpv_ctx) { Json::Value response_json(Json::objectValue); if(res < 0) { response_json["status"] = "error"; - response_json["message"] = mpv_error_string(res); + response_json["message"] = std::string("duration: ") + mpv_error_string(res); } else { response_json["status"] = "success"; response_json["data"] = duration; @@ -114,7 +114,7 @@ static Json::Value handle_json_command_sub_add(mpv_handle *mpv_ctx, const Json:: const int res = mpv_command_async(mpv_ctx, 0, args.data()); if(res < 0) { response_json["status"] = "error"; - response_json["message"] = mpv_error_string(res); + response_json["message"] = std::string("sub-add: ") + mpv_error_string(res); } else { response_json["status"] = "success"; } @@ -128,7 +128,7 @@ static Json::Value handle_json_command_cycle_fullscreen(mpv_handle *mpv_ctx) { Json::Value response_json(Json::objectValue); if(res < 0) { response_json["status"] = "error"; - response_json["message"] = mpv_error_string(res); + response_json["message"] = std::string("cycle fullscreen: ") + mpv_error_string(res); } else { response_json["status"] = "success"; } @@ -644,7 +644,7 @@ int main(int argc, char **argv) { break; } else if(event->event_id == MPV_EVENT_END_FILE) { mpv_event_end_file *end_file_event = (mpv_event_end_file*)event->data; - if(end_file_event->error == MPV_END_FILE_REASON_ERROR) { + if(end_file_event->reason == MPV_END_FILE_REASON_ERROR) { exit_code = 2; break; } |